A URL slug is the last part of a URL address that serves as a unique identifier of the page.
For example, the article you’re reading now has a URL that looks like this:
Its URL slug is “what-is-a-url-slug.”
Google’s John Mueller has confirmed that words in a URL are a ranking factor.
But he also emphasized that it’s a “very very lightweight” one, and it primarily helps to assess the page before Google accesses it.
In one of his tweets, Mueller said:
Even if having keywords in the URL is a ranking factor, we shouldn’t overestimate its effect on rankings.
However, it might still make sense to use the target keyword of a page in a URL slug. Especially considering the user experience (UX) point of view, which is closely connected to SEO.
Let's take a look at these two examples:
While the first example provides clear information about the content of the post, the second is just a chain of numbers that doesn't provide any added value.
If someone only saw these two URL addresses, they'd be more likely to click the first one. Regardless of the actual content on either page.
That's why a URL slug should provide a concise description of a page.
Let's take a look at some best practices and tips on how to create good URL slugs.
As we've already mentioned, the primary role of URL slugs is to make URLs more user-friendly. Therefore, they should describe the content of a page.
Using the target keyword is a great way to achieve this. Why? Because it’s usually an accurate, yet very short, description of what the page is about.
A good URL slug shouldn't be too long. Long URLs are harder to read and remember. Try to use fewer than five words in your slug.
Also, a URL that’s too long will get truncated in Google’s search results. While this is not an SEO disaster, it doesn't make the page snippet look very good.
Here’s an example of a good and bad URL slug for a page targeting the keyword “keyword research.”
How you separate the words (or not) influences the readability of a URL slug. Separating the words in the slug helps users understand the URL more easily.
The best practice is to use hyphens to separate words in URLs. Search engines may not correctly interpret other separators (like underscores).
Since URLs are case-sensitive, it’s best to stick to lowercase characters to avoid mistyped URLs.
Lowercase URLs are also easier to type manually.
Google Search Central recommends avoiding non-ASCII (American Standard Code for Information Interchange) characters, such as special characters of some languages or emojis.
Here’s an example for a hypothetical page in German:
And one using emojis: