What is a slug in WordPress?

What is a slug in WordPress?

Posted 27th August, 2019 by Nadejda

If your website is WordPress based or you work is closely connected to the SEO field then you have almost certainly heard the phrase “creating the right slug”. But what exactly does that mean and how can you use them correctly on your website?

What is a WordPress Slug?

The text part after your domain name which you can edit when writing a new post in WordPress. The slug identifies what the page is about.

You can have more than one slug in your URL as each slug represents the different category, post, page, etc. You can make changes to absolutely every slug on your website.

Slugs in SEO

From a SEO point of view slugs play a vital role in shaping your Google ranking. The slugs you choose will help Google in assessing what the content of the page is about and eventually what people will see in their search results.

What to consider when writing your WordPress slug?

There are two basic rules to follow when choosing your slugs: you can use only lowercase letters and make sure to change all spaces with dashes. As WordPress is a quite a sophisticated CMS it will automatically do that for you even if you type it wrong.

WordPress Post Slug

When you create or edit an already existing post on WordPress, first start off with locating the PermalinkURL, bellow the Title box.

Click on the Edit icon. You can see that the slug part of the URL can be edited.

Write your chosen slug, click OK and then Publish/Update.

Make sure to keep your slugs clean and simple. Users always prefer to click on URLs which are on point and show the main topic. This can strongly improve the aesthetics and usability of your links. If you don’t type in the slug yourself then WordPress will automatically do that based on your title.

WordPress Page Slug

As with the post slug, you simply click on Edit next to the Permalink and type in your chosen slug. Make sure to confirm the change with OK and Publish/ Update.

WordPress Category and Tag Slug

When creating a new Category or Tag WordPress will automatically create the slug for you. If you still want to manually make the change, you can simply go back and amend it after creating the Category/Tag.

The steps are identical for both Categories and Tags.

Click on Posts Categories/Tags. Choose the Edit option and fill in the slug you have chosen. Don’t forget to save the changes using the Update button.

Should you change WordPress Slugs Later?

Before making any changes to a slug at a later stage make sure it is absolutely necessary. It is highly possible that visitors who try to access the original URL will have trouble doing so.

In the case of Posts and Pages, WordPress tries to automatically redirect visitors to the new slug. It doesn’t always work however and you will need to set up a redirect to the URL.

There is also the SEO aspect you need to consider as Changing the original slug will affect the current ranking and visibility of the page.

Categories: Wordpress, Optimisation, Website Maintenance