When search engines crawl your website, to know what your webpage’s content is about they look at:

  • The title
  • Headers
  • Body text
  • Image alt text
  • Meta description
  • URL

And URLs are the first place search engines crawl, that’s why optimising them is important for improving your on-page SEO.

URLs are also the first thing your visitors see when visiting your website.

And URLs that are long or have random numbers and letters, aren’t trusted compared to ones with information about the page.

So in this blog post, we will learn:

  • What a slug in WordPress is
  • How to best optimise them
  • How to change them on your WordPress website

Let’s dive right in.

What is a slug?

A slug is the part of a webpage’s URL that you can edit and change.

It’s located at the end of a URL and usually has keywords with hyphens between them.

Depending on the website’s permalink structure, a few examples of what URLs could also include are:

  • The day
  • Month
  • Time
  • Identifying numbers
  • Author name

Now let’s take a look at the following URL:

  • https://blog.examplewebsite.co.uk/website/example-webpage

And the different parts of the URL:

  • The scheme: You will see https:// or http:// for websites without SSL certificates
  • The subdomain: The “blog” part of the URL or “www” for others
  • The second-level domain: The website name or “examplewebsite” in this example
  • The top-level domain: The “.co.uk” part of the URL or it could be .org, .net, .io, .com
  • The subdirectory: The “website” part of the URL, which is the website’s subsection and can range from one to a few or even none
  • The slug: The “example-webpage” part of the URL which shows the specific webpage in the subdirectory

Permalinks and Slugs

Permalinks and slugs are often used instead of each other when URLs are mentioned.

But they are different.

A permalink is a webpage’s permanent URL on your website.

The permalink shouldnt change after the webpage goes live.

And a slug is the webpage’s name at the end of a permalink.

And this is what helps readers and search engines know what the webpage is about.

Optimising URL’s Slug in WordPress

When it comes to your website, design for both humans and search bots.

This includes optimising a URL’s slug in WordPress.

This URL makes more sense:

  • https://blog.examplewebsite.co.uk/website/example-webpage

Compared to this URL:

  • https://blog.examplewebsite.co.uk/website/post-id?=5726fjwenfkd

And this is the reason slugs help when it comes to your website visitors’ user experience.

So, to optimise your slugs for search engine bots and your readers, do the following:

Add 1-2 keywords

Add the keyword phrase in your slug that you want to rank for.

Doing so tells both search engines and readers what the webpage is about.

Remember to use hyphens to separate each word.

Match your webpage’s title

Make sure your URL slug matches the title of your webpage.

Remember, don’t just simply copy and paste the title of your webpage. 

Because the ideal title length is 60 characters or less, so webpage titles should be longer than your slugs.

Plus titles use spaces and title cases, but slugs use hyphens or underscores between words and are all lowercase.

Take out unnecessary words

Make your slugs readable by taking out stop words.

Which are basically pronouns, articles and prepositions and are ignored by search engines.

So if your slug makes sense without certain words included then delete them.

Changing URL Slugs in WordPress

WordPress uses the plain permalink structure, by default.

But this structure is not SEO-friendly because it does not contain keywords.

So change this default permalink structure to make it more SEO-friendly:

  • Go to Settings
  • Then Permalink
  • And click on a different option

Like the “Post name” option, which gives you a short slug that includes relevant keywords.

Note: Try to change your permalink settings before making your website live.

Changing your permalinks after means setting up redirects from old URLs to new ones.

Or simply use a WordPress plugin for your redirects.

Then you will get a notification when your permalink structure is updated successfully.

Do the following to individually edit your webpage’s slugs on your website:

  • Go to “Posts”
  • Then click on “All Posts”
  • Go to the post and click Quick Edit
  • Then you will see the post’s slug
  • Edit the slug and click Update

Repeat this process for all the posts and webpages whose slug you want to change.

Conclusion

URLs that are clean and clear are seen as professional and more experienced.

Other benefits include being:

  • Better for SEO
  • Make your website appear legit
  • Shows visitors how your website is structured

So remember, changing your URL slug to make your WordPress website appeal to both humans and search engines.

Now it’s over to you.

Tell me how optimising your URL slugs has helped your website?

Let me know in the comment section below.

1 thought on “Slugs in WordPress”

  1. Pingback: Permalinks - XXMG

Leave a Reply

Your email address will not be published. Required fields are marked *