tattooedbuddha
Senior Member
- Jul 19, 2020
- 860
- 5,742
How to write URL slugs 101
URL slugs are all about relevance and cost of retrieval.
Let’s get into it.
What is cost of retrieval?
Cost of retrieval is all about making it as cheap as possible for Google to retrieve information from your page. I.e. decreasing average page sizes, giving direct factual answers to queries, using clear HTML structure.
It’s about lowering the barrier for Google to index and rank your content, a webpage can be of very high quality yet if it’s not worth the crawling cost, it will not rank.
This leads us to a seemingly small yet important part of lowering the cost of retrieval, the URL of a webpage.
Let’s pretend we have a website about traveling in Scandinavia, and we want a page about life in Sweden, now that's a fairly broad topic don't you think? It certainly warrants a whole cluster of pages beneath it for support.
So how should we write the URL for this page?
Which of the below examples do you think is the most relevant and cost efficient to the query of “life in sweden”?
Example 1
website.com/life-in-sweden/
OR
Example 2
website.com/sweden/life/
OR
Example 3
website.com/sweden/life-in-sweden/
OR
Example 4
website.com/life/sweden/
OR
Example 5
website.com/8-amazing-things-about-life-in-sweden/
Did you guess correctly?
That’s right! Example number 5!
No, not really. The correct answer is example number 2.
Why?
Because it has the smallest cost of retrieval (it’s as short as possible) while still having the highest possible relevancy for the query.
But Tattooedbuddha, would not example 4 perform just as well? It’s just as short and contains the same words even!
The difference here is about contextual relevancy, a page with the URL “website.com/sweden/” and a page with the URL “website.com/life/” is going to contain vastly different content and put the pages following it in a different context as well.
Let’s say we want supporting pages for our page about life in Sweden, using example number 2 as a starting point this becomes simple. All we need to do is find different attributes of life in Sweden, if we want a page about the culture, the url becomes “/sweden/life/culture/”, if we want to write about social life, it becomes “/sweden/life/social/” etc.
This creates a clear, cost-efficient, relevant, and user-friendly URL that is easy to understand for both users and crawlers.
It also allows for easy, natural internal linking between pages to distribute pagerank. This is because if your internal links do not have any kind of relevance, logic or clickability, they will not pass pagerank or relevance.
For a URL like “/sweden/life/social”
- If sweden and life are both high quality pages, the search engine will assume that the page for culture is of high quality as well, and it will get crawled.
- The search engine will also understand that the main topic of the page “social” is about “social life in Sweden”
- This also allows for natural internal linking between other contextually relevant pages, like “norway/life/social”
- Do not repeat words in URL slugs.
- Try to use single words or two words at most.
- Keep the most important attributes closest to the root of the URL.
- Smaller URLs generally give better rankings (less cost of retrieval).
- Use the URL to set the macro context of the page, while the page title sets the micro context.