[GUIDE] How to write URL slugs 101

tattooedbuddha

Senior Member
Joined
Jul 19, 2020
Messages
860
Reaction score
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”
TL;DR
  • 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.
That’s all for today, cheers!
 

the url becomes “/sweden/life/culture/”,

if we want to write about social life, it becomes “/sweden/life/social/” etc.​

For a URL like “/sweden/life/social”
do we need to create categories for each of these? (life, culture, social etc). if not how to add '/' to the URL?
 
do we need to create categories for each of these? (life, culture, social etc). if not how to add '/' to the URL?
It depends, if you create them using pages, you can use parent pages. If you create them using blog posts, you can use a permalink plugin. If anyone has any other solutions, feel free to write them here =)
 
Yo @tattooedbuddha, this guide will be super useful for newcomers to the IM scene. Thanks for that.

Want to also elaborate for them on using numbers in the URL Slug
Thank you and numbers are another great addition.

Let's keep it as simple as possible:

In 99% of cases, I would advise against using numbers in the URL unless it is an attribute or in any other way relevant to a specific query.

For example, if you are writing an article with the title "Best Headphones for Gamers | Guide 2023" or something similar with the year in it, I would not include the year in the URL.

Including it would create unnecessary complications and require redirects for every new year. Instead, it's better to keep the URL slug more general and omit the specific year. This way, the article can remain accessible and relevant for multiple years without the need for constant URL changes.

Edge cases would be if for example you are running a website with an insane amount of pages, like a forum, social media or a news website, where you would need numbers simply to differentiate a lot of user generated content.
 
Cool share!
Tell me, you omitted factoring in the keyword.
Any reason for that?
So for example if you are writing an answer post for the question which is the keyword
Why life in Sweden is amazing
Heading/title is
8 reasons why life in Sweden is amazing

So url slug need to be
Why life in Sweden is amazing
Or
Life in Sweden
 

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”
TL;DR
  • 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.
That’s all for today, cheers!
This is actually very interesting.

Blog posts on WordPress, is it even possible to nest posts inside another post?

Or you plan on doing that with category pages.

For example...

website.com/sweden/ should be a distinct post on its own. How then do you nest 'life' inside it.

All this assuming you're not working with category pages.

I'm not arguing against your message but rather seeking clarification.

Of course it's easier and much better/profitable to have your destination page as close to the root as possible and even shorter in lenght.

But that nesting is a bit confusing, especially when it gets much longer as in the 'culture' example.
 
Cool share!
Tell me, you omitted factoring in the keyword.
Any reason for that?
So for example if you are writing an answer post for the question which is the keyword
Why life in Sweden is amazing
Heading/title is
8 reasons why life in Sweden is amazing

So url slug need to be
Why life in Sweden is amazing
Or
Life in Sweden
If you really want a separate post for "8 Reasons why life in Sweden is amazing" I would either include it as a subheading in a larger article, like "/sweden/life/" OR if it has enough search volume on its own to warrant a separate article I would simply have it as close to the root url as possible, like "/why-life-in-sweden-is-amazing" or "/why-life-sweden-amazing"

It depends.

Why?

It ties into topical maps and topical authority, a topical map has 2 sections, an outer section and a core section. The outer section is there to build topical authority so that the core section (where your money pages will be) has a lot easier to rank.

It depends on the monetization method of your website, if you are a company selling tourist tours and trips in Sweden, then your outer section should be all about Sweden, the culture, what life is like, the music, the food, the weather, the history, etc. While your core section of your topical map ties it to your services more specifically, in this case tours and trips in Sweden.

For this reason the outer section will mainly be linking to the core section, its purpose is to get more and higher historical data (and more sessions and queries)-

If you are able to cover all attributes of the entities in the outer section, and if you are able to provide enough level of expertise, accuracy, unique information and continous quality increase, the search engine will be increasing your websites authority to its central entity. When this happens, ranking for the core section of your topical map becomes a cakewalk.
This is actually very interesting.

Blog posts on WordPress, is it even possible to nest posts inside another post?

Or you plan on doing that with category pages.

For example...

website.com/sweden/ should be a distinct post on its own. How then do you nest 'life' inside it.

All this assuming you're not working with category pages.

I'm not arguing against your message but rather seeking clarification.

Of course it's easier and much better/profitable to have your destination page as close to the root as possible and even shorter in lenght.

But that nesting is a bit confusing, especially when it gets much longer as in the 'culture' example.
Here is a simple trick that works (without using a plugin)

Lets say you want to have 3 different posts, Sweden, Life and Culture.

Create categories for Sweden and life.

Then create posts for all three.

The Sweden post should not be in a category = website.com/sweden/

You then put your life post in the Sweden category that you created = website.com/sweden/life/

You then put your culture post in the life category you created = website.com/sweden/life/culture/

The only downside with this is that it creates website.com/category/life/ pages for your categories, I suppose you could noindex these, but I'm not sure how that would affect the posts themselves.
 
The only downside with this is that it creates website.com/category/life/ pages for your categories, I suppose you could noindex these, but I'm not sure how that would affect the posts
Yea, it's a bit rough. If you have lots of posts to create I don't think this method would be the most optimal. I could be wrong.

I usually rely on website.com/post-url

But said post would be filed under a category which could also be filed under a different category, depending on the topic and how it relates to others.
 
Yea, it's a bit rough. If you have lots of posts to create I don't think this method would be the most optimal. I could be wrong.

I usually rely on website.com/post-url

But said post would be filed under a category which could also be filed under a different category, depending on the topic and how it relates to others.
Yup, best solution I've found so far is using a permalink plugin to handle it, but I'm sure there must be other solutions out there :)
 
Yup, best solution I've found so far is using a permalink plugin to handle it, but I'm sure there must be other solutions out there :)
How about using hooks if your theme support it to the category pages that wordpress uses default, and add text before and after the category query, to get a category page that becomes ctategory title - text - category query - more text to use the default category pages?
 
How about using hooks if your theme support it to the category pages that wordpress uses default, and add text before and after the category query, to get a category page that becomes ctategory title - text - category query - more text to use the default category pages?
That's one solution as well! :)
 
If you really want a separate post for "8 Reasons why life in Sweden is amazing" I would either include it as a subheading in a larger article, like "/sweden/life/" OR if it has enough search volume on its own to warrant a separate article I would simply have it as close to the root url as possible, like "/why-life-in-sweden-is-amazing" or "/why-life-sweden-amazing"

It depends.

Why?

It ties into topical maps and topical authority, a topical map has 2 sections, an outer section and a core section. The outer section is there to build topical authority so that the core section (where your money pages will be) has a lot easier to rank.

It depends on the monetization method of your website, if you are a company selling tourist tours and trips in Sweden, then your outer section should be all about Sweden, the culture, what life is like, the music, the food, the weather, the history, etc. While your core section of your topical map ties it to your services more specifically, in this case tours and trips in Sweden.

For this reason the outer section will mainly be linking to the core section, its purpose is to get more and higher historical data (and more sessions and queries)-

If you are able to cover all attributes of the entities in the outer section, and if you are able to provide enough level of expertise, accuracy, unique information and continous quality increase, the search engine will be increasing your websites authority to its central entity. When this happens, ranking for the core section of your topical map becomes a cakewalk.

Here is a simple trick that works (without using a plugin)

Lets say you want to have 3 different posts, Sweden, Life and Culture.

Create categories for Sweden and life.

Then create posts for all three.

The Sweden post should not be in a category = website.com/sweden/

You then put your life post in the Sweden category that you created = website.com/sweden/life/

You then put your culture post in the life category you created = website.com/sweden/life/culture/

The only downside with this is that it creates website.com/category/life/ pages for your categories, I suppose you could noindex these, but I'm not sure how that would affect the posts themselves.
Makes sense. I gotta adopt to topical authority. Blogging is not like before. Now it's rank fast, cash out and get out. I use a group buy of semrush, i check what people are searching. They are going after high volume keywords, days of Longtail are getting over.
 
This is the first time I hear cost of retrieval of URL, can you support your claims? Any patent or Google publication?
 
This is the first time I hear cost of retrieval of URL, can you support your claims? Any patent or Google publication?
This case study might help you, cost of retrieval is not exclusive to URLs.

What it essentially boils down to is this: crawling and indexing cost money, make it as cheap as possible for search engines to crawl and understand your content. This thread shows you how to optimize your URLs to do this :)
 
one more question. I tried the method using a permalink manager plugin and the URLs can be customized as you said. is it a redirection? is yes, with so many posts there will be a huge amount of redirects. will that be a problem then?
 
one more question. I tried the method using a permalink manager plugin and the URLs can be customized as you said. is it a redirection? is yes, with so many posts there will be a huge amount of redirects. will that be a problem then?
If its a decent permalink manager then no, it should not be a redirection.
 
Back
Top