Have you ever wondered what a WordPress slug is? In this article, you will learn the definition of a WordPress slug and how to define it in WordPress. We will also provide some tips for setting up user-friendly and optimized Slugs for SEO.

But before we start, if you have never installed WordPress, find out How to Install a WordPress Blog in 7 Steps et How to search, install and activate a WordPress theme on your blog 

Then back to why we are here.

What is a WordPress Slug?

A WordPress slug is text that comes after your domain as part of your permalink that leads to your content.

If you add a new post, WordPress automatically generates the slug based on your permalink settings. You can go in Settings -> Permalinks and change the way slugs are generated.

Although WordPress automatically sets the slug, it's not always recommended to leave it that way. The default slug may not be search engine and human friendly.

How to Set Slugs in WordPress

Before setting your slug, you should know the two basic rules:

  • Change spaces to dashes;
  • Only lowercase letters allowed.

WordPress will automatically correct these rules for you. But, it will be better if you understand this before going any further.

WordPress post slug

You can set your post slug while writing or editing your post. In the old editor, go under your post title area and find the permalink URL. If you can't find a permalink there, you need to enter your title first. Once the permalink is displayed, you can modify your slug by clicking on the button Edit. When you are finished, click OK.

In the Gutenberg block editor, the procedure is quite different. Just enter your title and save the draft of it. The URL of the Slug will be applied directly, respecting the rules stated above. To edit this, Go to the block editor sidebar and in the Permalink section, edit your Slug.

WordPress slug

WordPress Page Slug

Similar to an article slug, setting up the page slug is quite easy. The page's permalink URL can also be found under the page name box. Click on Edit, type your page slug, then click OK.

Tag Category and Slug

WordPress automatically gives a slug for a new category or tag you created. However, if you prefer to define your own slug manually, you must create a category first and come back later.

To define category slugs, you go to Articles and choose Categories. Find the category you want to edit and click the button Edit. Enter your slug in the slug box and click Update profile to save the change.

Changing beacon slugs is similar. Go to Publications and choose Tags. Find the tags you want to edit and click the button Edit. After entering your tag slug, click Update profile to save the change.

User slug

If you have a news website or a website with many contributors, you can also create a slug for each author. Unfortunately, by default, WordPress does not allow editing the author slug. Therefore, you will need the plugin Edit Author Slug. Once the plugin is activated, go to Account -> All Accounts. Choose the user and click Edit, scroll down to Edit Author Slug Options. Type the desired slug and press the button Update Profile to save the change.

WordPress slug

Tips for setting the WordPress slug

Target your SEO keywords

Many SEOs think you can get better search engine results if you include keywords you want to rank for in your URLs. Therefore, it is better if you have the keyword in your slug. You can even use your target keyword as your slug.

Keep it simple but descriptive

Short slugs are more likely to rank in Google and are more user-friendly. Thus, it is best to make your slugs short and pointed towards your target keywords.

No stop words

We recommend that you remove unnecessary words from your slugs, including stop words such as "a", "the", "and" and other similar words. If you are using the Yoast SEO plugin, you will be helped to remove these words from your permalink.

Use redirects

When you change WordPress slug, the whole URL changes. This means that users and search engines will not be able to find content using the old URL. If it happens that you need to change the already existing slug, we recommend that you configure the 301 redirect from the old to the new slug. You can easily do this with Yoast SEO or plugins redirect.

So now you know that the WordPress slug is text that comes after your domain and is part of your permalink. Optimizing and configuring the slug in every post, page, category and tag can result in a more human and search engine friendly website.

Other recommended resources

We also invite you to consult the resources below to go further in the grip and control of your website and blog.

Conclusion

That's it for this guide that tells you what the WordPress Slug is while showing you how to set it up and use it. If you have any concerns or suggestions, please let us know within Comments.

However, you will also be able to consult our resources, if you need more elements to carry out your projects of creation of Internet sites, by consulting our guide on the WordPress blog creation or the one on Divi: the best WordPress theme of all time.

Waiting, share this article on your different social networks.   

...