Search the site:

Copyright 2010 - 2024 @ DevriX - All rights reserved.

URL Slug: Why It Matters for SEO and How to Optimize?

URL Slug_ Why It Matters for SEO and How to Optimize

Quite often, when talking about SEO, people in the field mention slugs. You can be sure that they are not referring to the small slimy creatures, but rather a webpage parameter.

Today, we are going to discuss all the essentials about a URL slug – what it is, how to optimize it, and why you should care about it.

Without further ado, let us get started.

Readers Also Enjoy: Keyword Mapping for SEO: The Ultimate Guide – DevriX

What Is a URL Slug?

A URL (short for Uniform Resource Locator, a.k.a., website slug) is a unique identifier of a page. Every single page has a unique URL address, and two duplicate ones cannot co-exist.

For example, the URL address of one of our blog posts is:

https://devrix.com/tutorial/captive-product-pricing/

The last part /captive-product-pricing/ is the slug of the URL, while the URL is the entire address you see.

URL Slug for SEO: Why Does It Matter?

The URL slug plays an important role in the overall user experience. Even though they are not considered to be major ranking factors, Google representatives have confirmed that URLs are considered to be a ranking factor, among many others.

As such, it is a good practice to include your target keyword in your slug, but more about that in a bit.

First, let us return to the user experience perspective. What do you think will provide a better experience for users:

1. https://yourwebsite.com/12345678
or
2. https://yourwebsite.com/what-are-url-slugs

Yes, it’s obvious that the second choice looks far more appealing, since it provides accurate information about the content of the page (without even opening said page).

On the other hand, the first address is generic, and one can only guess what they will find on the page should they click on it.

Readers Also Enjoy: Top 22 Common UX Mistakes [And How to Fix Them] – DevriX

5 URL Slug Best Practices

5 URL Slug Best Practices

  1. Include Your Target Keyword
  2. Keep It Short and Concise
  3. Think About the Future
  4. Follow the Readability Standards
  5. Update Your Old Slugs

1. Include Your Target Keyword

The best thing you can do to optimize your URL slug for SEO is to include your target keyword. Nothing more, nothing less.

Apart from helping your search engine optimization efforts, this provides a nice experience to users, as they can instantly know what your page is about just from looking at the URL.

Here’s an example from our blog, with the target keyword being “great startup ideas”: https://devrix.com/tutorial/great-startup-ideas/

You see, it is short, to the point, and leaves no room for interpretation.

2. Keep It Short and Concise

One of the URL best practices is to keep your slug short and straightforward. Short, because if it is too long, it will get cut from the SERP preview (similar to too long page titles). Of course, that will not be the end of the world, but it will also not be great for user experience.

Straightforward, simply because it is like a road sign that should include just the most crucial info. What would you think, if you see a road sign that says: “Hello, friend, you are 241 miles (387.85 km) away from Boston, so drive safely, and have a good day”?

That is right. You won’t be able to read more than a few of those words from your moving car. The same goes for people looking for information on search engines. No one will pay attention to your URL if it is way too long, and therefore it will not be helpful, at all.

Readers Also Enjoy: Campaign URL Builder: A Comprehensive Guide for Marketers – DevriX

3. Think About the Future

Do you know why numbers are great for page titles, but not for slugs?

Let’s say your page is named “14 Best Project Management Tools in 2024”, and your slug is the same, respectively – /14-best-project-management-tools-2024

You don’t see anything wrong with that? Okay, now imagine a year passes, it is 2025, and you decide to update the page. While doing research, you notice some new tools you want to include. Once you’re done, you update the title to “18 Best Project Management Tools in 2025”.

However, the slug stays the same as before – you cannot update it, once it is created. You have two options now.

  1. Keep the old slug. The downside is that it will look outdated, and misleading, since it’s not the current year, and what’s more it will state “14 Best”, when, in reality, you have now featured the “18 Best”.
  2. Redirect. A 301 redirect can solve your problem. It will forward your old URL to a new one, keeping the content of the page. Redirects are cool, there is nothing wrong with them, unless you overdo them. Then, they can lead to performance issues on your website, such as errors, and slow loading pages.

All in all, it is best to avoid numbers in your slugs. It will save you a lot of work and troubles in the future.

Readers Also Enjoy: SEO for Bing: Grow Your Rankings Beyond Google – DevriX

4. Follow the Readability Standards

There is a reason as to why slugs are structured the way they are: /url-slug-structure

What are the standards?

  • Use hyphens (-), not underscores (_)
  • Only small letters, no capitalization.
  • Separate words (/url-slug-structure), instead of (/urlslugstructure).
  • Avoid special characters and emojis.

These are all organized in a way that is best for readability. It is a proven work methodology, so please do not try to experiment with it, and make any changes that may lead to user experience or SEO issues.

5. Update Your Old Slugs

During the course of our lives, we constantly learn new things, and improve ourselves. You might have started your website way back, when you had no knowledge about good URL slug practices. And that’s okay.

The best you can do is to update your old slugs, so that they follow the new standards. Consequently, you shouldn’t try to simultaneously update every single slug. Such actions are risky, because they can hurt your search engine rankings.

Instead, start by optimizing a couple of low-performing pages on your site. Look at how they are doing after the update, and if there aren’t any significant downsides, repeat with a few more.

This should not be done at all costs, mind you. In case you fear losing rankings, links, and traffic, just leave them as they are, and use the best slug practices for your future pages.

Properly Optimized URL Examples

Now, let us recap what we have learned, and summarize how a properly optimized URL should look with a few examples.

  1. Marketing psychology. Here’s the perfect slug in action. As you can see, the title is lengthy, and includes a number, however the slug just states “marketing psychology”, which is the target keyword. Less is more.Marketing psychologySource
  2. ChatGPT Alternatives. Another great example of a perfect slug. Again, it only features the target keyword. While there is a number, and the current year in the title, the person in charge of publishing followed the best practices, and did not include those in the slug.Chat GPTSource
  3. Writing tips. Yet another fine URL slug. The target key phrase is present, nothing more, nothing less. Again, the page title itself features a number, and some additional words to hook the reader, but none of them are in the slug. In practice, this makes for an effortless post update, since the way the slug is set makes it evergreen.Writing TipsSource

Readers Also Enjoy: How to Optimize Meta Descriptions for SEO – DevriX

URL Slugs and WordPress

WordPress is the most popular CMS (content management system) in the world. At DevriX, we are fanatical about all things WordPress (we’ve even created the WordPress retainer model), but it’s not only us.

You see, WordPress is a master at making a lot of things easier. One of these things is setting up your URL preferences.

Here’s how to do it.

  1. Open your WordPress website dashboard.
  2. Go to “Settings”, and click on “Permalinks”.
  3. Select the 5th option (from top to bottom) “Post name”.
  4. Now, WordPress will automatically generate slugs based on the name of your posts.
  5. You will be able to edit the post slugs.

There are two ways to manually edit your slugs. The first is through the post settings (on the right side, when you edit or create a new post). The second is through the SEO plugin you are using, for example Yoast.

Simply scroll down to the Yoast SEO block, and you can manually write the slug, under the “Slug” field, like this:

URL Slugs and WordPress

It can’t get any easier than this, can it?

Summary

A URL slug is a unique identifier that every page on the web has. More than that, URL slugs are a small, yet important part of SEO.

Remember to follow the best practices when creating your slugs. Keep them short, straightforward, easy to read, no numbers, and above all, include the target keyword.

After all, it might just be a slug, but it can boost your website traffic, enhance user experience, and be the difference between a click and an impression.