What is the WordPress slug?

Have you ever wondered what a slug is? In this article, you will learn the definition and how to set one up in WordPress. We’ll also give you some tips for setting up slugs that are easy to use and optimized for search engines. Let us begin.

What is a WordPress slug?

A WordPress slug is a text that comes after the domain name and is part of the address that leads to your content.

If you create a new post, WordPress automatically generates the slug based on your Permalinks settings. You can go to Settings -> Permalinks and modify the way this character string is generated.

Although WordPress automatically defines the slug, it is not always recommended to leave it that way. The default slug might not be optimized for search engines, or attractive to people.

How to configure slugs in WordPress

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

  • Change spaces to hyphens;
  • Only lowercase letters are allowed.

WordPress will automatically correct these rules for you. But, it will be better if you have this clear before proceeding.

In WordPress Posts

You can set them in your post while you’re writing or editing it. Go under the title field of your post and look for the permalink URL. If you can’t find the permalink there, then you have to write the title first. After the permalink appears, you can edit the slug by clicking the button Edit. When finished, click To accept.

On WordPress Pages

Similar to a post slug, setting a page slug is quite easy. The page’s permalink URL is also located below the page name field. click on Edittype the page slug and click To accept.

See also  How to set up email on Android

From Categories and Tags

WordPress automatically defines a string for each new category or tag you create. However, if you prefer to write your own slug manually, you must create a category first and come back later.

To set up category slugs, go to Tickets and select Categories. Find the category you want to edit and click the button Edit. Enter your slug in the corresponding field and click To update to save the changes.

Changing the slug of the labels is similar. go to Tickets and select tags. Find the tags you want to modify and click the button Edit. After typing your tag slug, click To update to save the changes.

From author

If you have a news website or one with many contributors, it is also possible to create an address for each author. Unfortunately, by default, WordPress does not allow you to edit the author slug. Therefore, you will need the help of the plugin. When the plugin is active, go to Users -> All users. Choose the user and click edit userthen scroll down to the options Edit author slug. Write the slug you want and press the button Update profile for the changes to be saved.

Tips for setting up WordPress slugs

include keywords

Many SEO experts believe that you can get better search engine results by including your target keywords in your URLs. Therefore, it is better to include the keyword in the slug. You can even use the target keyword as your slug.

See also  How to install GIT on Windows, MacOS and Linux

Keep it simple but descriptive

Short slugs have a better chance of ranking on Google and are more attractive to users. Therefore, it is better to keep the slugs short and related to specific keywords.

no connecting words

We recommend removing unnecessary words from slugs, including connectors and particles like “a”, “the”, “and” and other similar words. If you use the Yoast SEO plugin, it will help you remove those words from the URL.

use redirects

When you modify the WordPress slug, the entire URL changes. This means that neither users nor search engines will be able to find the content using the old URL. If it ever happens that you need to alter an existing slug, we recommend setting up a 301 redirect from the old to the new one. You can do it easily with Yoast SEO plugins or .

You can also check the ones offered by . All plans include a powerful Control Panel and drag-and-drop website builder. You are just 1-click away from fast, secure and scalable WordPress hosting.

conclusion

Now you know that the WordPress slug is a text that comes after the domain and is part of the permalink. Optimizing and tweaking it on every post, page, category, and tag can make your website more friendly to both humans and search engines. We hope this article has helped you implement best practices for slugs.

Gustavo is passionate about creating websites. He focuses on the application of SEO strategies at for Spain and Latin America, as well as the creation of high-level content. When he is not applying new WordPress tricks you can find him playing the guitar, traveling or taking an online course.

Loading Facebook Comments ...
Loading Disqus Comments ...