Content and Media

Permalinks & Slugs

Permalinks are the permanent URLs to your individual pages and blog posts, as well as your category and tag archives. Slugs are the URL-friendly names of your posts, pages, categories, and tags.

This is an example of a permalink:

https://yourgroovydomain.com/2020/01/01/first-blog-post

In the above example, the slug is first-blog-post.

Table of Contents

How Slugs Work

When you give a post, page, category, or tag a title, WordPress will generate a slug automatically.

The slug is the portion of the URL that refers to that specific page. Generally speaking, slugs tend to be very similar to the original title.

A slug will be different when the title contains certain characters, like spaces or currency symbols, as well as anything else that isn’t a letter or a number. In those cases, the special character is either replaced with its URL-friendly equivalent or left out of the slug entirely.

The most common substitution is in titles that have more than one word, separated by spaces. In that case, each space is replaced by a hyphen ( – ).

↑ Table of Contents ↑

Identifying Slugs

Posts & Pages

You can view the slug in the editor for a post or page in the Page/ Post settings under ‘Permalink’:

You can also use this section to edit the slug if you’d like to use something other than the default slug that is created automatically.

Categories & Tags

These instructions are referring to the WP Admin interface. To view this interface, click the View tab in the upper right corner and select Classic view.

If you’d like to find the slug for a category or tag, visit Posts Categories or Posts Tags in the Dashboard.

Screen Shot 2015-08-31 at 10.26.06 AM

Once you’ve loaded the Category or Tag page, you’ll see a listing on the right of all your current items. The Slug column will display the slug for each category.

Screen Shot 2015-08-31 at 10.32.51 AM

↑ Table of Contents ↑

Numbers At The End Of Slugs

Sometimes, you may find a slug has a number at the end of it that you didn’t put there. This happens when WordPress detects the same slug being used more than once.

Because the slug is the identifying part of each post, page, category or tag’s address, they have to be unique.

An example of when this might happen is if you wrote a post entitled “Happy New Year!” The default slug would be happy-new-year. If you were to write a similar post with the same title the following year, the default slug would be happy-new-year-2 to ensure that the two posts have unique addresses.

↑ Table of Contents ↑

This section of the guide applies to sites with the WordPress.com Business or eCommerce plan. If your site has one of our legacy plans, this feature is available on the Pro plan.

By default, WordPress uses post URLs that have the date and name in them. However, WordPress offers you the ability to create a custom URL structure for your permalinks. This can improve the aesthetics and usability of your links.

In the Settings → Permalinks screen, you can choose one of the more common permalink structures or enter your own in the “Custom structure” field.

⚠️

If changing from the default “Day and name” permalink setting to “Post name”, posts will not automatically redirect from the old links. To set this up, use a redirection plugin.

Image showing the permalinks settings
Changing the permalinks structure

↑ Table of Contents ↑

Sometimes, you may encounter errors related to permalinks. A troubleshooting step you can take is to reset the permalinks by doing the following:

  1. From your dashboard, go to Settings → Permalinks.
  2. Under Common Settings, take note of the option selected. If it’s Custom Structure, copy and paste it on a notepad so you can put it back later
  3. Select a different permalink structure and click Save Changes.
  4. Then select the permalink structure you initially had and click Save Changes. This action resets your permalinks.

Not quite what you're looking for?

Get Help