Help Center

How to Create WordPress Slugs and Permalinks

How to Create WordPress Slugs and Permalinks

This tutorial provides simple step-by-step instructions for creating a custom permalink structure in WordPress and manually modifying the post and page slugs.

A permalink or a permanent link is a URL address of a web page. Each page on the web has a unique set of symbols assigned to it, and by inserting this exact combination into the address bar, the users can access the desired web page. 

An example of a permalink could be

http://mysite/sample-post

or

http://mysite/?p=123

which looks more like the default WordPress-generated permalink.

Once a post or a page is up on the web, it is not recommended to change its URL address, hence the name permanent link. 

Things to know

If users try to access the web pages through permalinks that were valid in the past but were changed later, they will not be able to access the requested resource. Instead, they will encounter a “404 Page Not Found” error. Links that contain permalinks leading to 404 errors are called broken links. They negatively affect user experience and indirectly lower SEO ranking as UX is a ranking factor..

There are four common situations when permalinks are used:

  • People who want to use your content will link it to their posts through permalinks.
  • If you want to share your content on social media platforms, you include permalinks in your stories or social media posts. 
  • Google uses permalinks for indexing the articles.
  • You can share your content with anyone by sending permalinks via email, messengers, or other means of communication.

What Is a Slug?

In WordPress, a slug is a final part of a permalink that refers to a specific piece of content on your website. WordPress automatically assigns slugs to posts and pages according to permalink settings when users publish them. 

By default, automatically generated slugs include numbers and letters representing post ID. In the permalink http://mysite/?p=123, the part after the forward slash, ?p=123, is a slug that WordPress generated according to its default permalink settings. While the permalink containing this slug will correctly lead you to the researched content, it doesn’t provide humans or search machines with information about it.

As an essential element of the permalink, slugs are important for two reasons:

  • The search engines read slugs to understand web page content and lead users who search for similar content there.
  • Easy-to-read slugs help human users identify web page content. On the contrary, poorly structured permalinks may look like scams and put off users.

Optimizing the slugs and permalinks will give you an advantage over non-optimized URLs regarding SEO visibility. WordPress offers the ability to change the permalink structure of web pages. 

Go to Dashboard and then find the Settings bar. Click on it and proceed to Permalinks.

wordpress dashboard permalink settings

WordPress offers six options for setting permalink structures. The first on the list is Plain, automatically selected by WordPress before users choose other options. This option adds the ID of posts and pages to the permalink structure. 

plain permalink structure

The following four options add post date, time, name, and sequential number combinations to the permalink patterns. 

Custom Structure allows users to define their permalink structure by selecting one or a few structure tags available in WordPress.

custom permalink structure

Select category and tag bases

Optionally, you can change custom structures for the category and tag URLs by adding prefixes in the Category Base and Tags Base fields.

changing category and base structures

Using the example above, the permalink for a selected category will look like this:

http://mysite/blogs/category1

Save changes

After all necessary changes are done, click “Save Changes” at the bottom of the page. Ensure a Permalink structure updated message appears on top of the page after a successful update.

How to Set Post Slugs Manually?

After you set the permalink structure using one of the options, WordPress will create all permalinks using the same pattern. However, you can still change the permalink structure of selected posts and pages by manually creating their slugs before or after they are published. 

Find a quick edit section

Find the Post section in the Dashboard with the published posts and drafts list. Hover the mouse cursor over the post title to see a “Quick Edit” button, and click on it.

finding a post that needs a new slug

Type in a new slug

In the Quick Edit section, find a Slug field. It will appear empty if the post hasn’t been posted yet. Fill in the field or overwrite the existing slug with a new slug.

choosing a new slug for the post

Update the post

Click on the “Update” button. Congrats, this post has a new slug now.

How to Set Page Slugs Manually?

Setting a slug for a page is just as simple as setting a slug for posts. 

Find a quick edit section

Find the Pages section in the Dashboard. Hover the mouse cursor over the page title, and click on a “Quick Edit” button that appears underneath.

finding a page that needs a new slug

Type in a new slug

In the Quick Edit section, find a Slug field. Fill in the field or overwrite the existing slug with a new slug.

choosing new slug for page

Update the post

Click on the “Update” button. Congrats, this page has a new slug now.

Now, when you control the creation of permalinks on your WordPress site, learn how to optimize them for SEO.

Include search phrases that people type in the search engines search field. Search engines will use this information to identify your content and rank it higher for those who type in selected keywords.

Users will also know what to expect from visiting your page.

Use short slugs

Short slugs are more user-friendly and more likely to rank high in SEO. Don’t be overly specific when generating new slugs if this requires more wording.

Don’t include dates in permalinks notifying when the post was published; this information will make your content appear outdated and attract fewer users. Instead, update your content with relevant information.

Drop prepositions and articles

Leave out words that don’t say anything about the content they contain.

Follow the rules

All letters must be in lowercase because some servers treat uppercase letters differently. The ‘-’ characters must separate words in slugs.

Now you’ve learned what permalinks and slugs are and why they are vital for SEO visibility. Use the instructions above to set your site’s permalink structure and create SEO-friendly slugs for posts and pages.

Was this article helpful?
YesNo

Need help?

Ask Facebook community

Get answers from 22K Crocoblock Community experts from all over the world.

Start a live chat

Ask question to support agent and share its details via chat messages.