A Complete Guide to SEO Friendly URLs13 Min Read
This guide shows how to create SEO friendly URLs.
We will discuss how to optimise your URL structures and make them better from an SEO perspective.
Why optimise your URLs?
Because it is an important ranking factor. Plus, SEO friendly URLs improve your website’s usability.
Optimising your URLs is not very difficult. Here is our step by step guide on how to do that.
How to Create SEO Friendly URLs:
- Use the right TLD
- Make your URLs short
- Use only the safe characters
- Focus on readability
- Use fewer folders (2 max)
- Include keywords but avoid stuffing
- Implement HTTPS
- Omit filename extensions
- Make your URLs similar to the page titles (up to a reasonable degree)
- Block dynamic and infinite-space URLs
- Prefer subfolders to subdomains
- Use redirections and canonical tags properly
1. Use the right TLD
TLD or Top Level Domain is the last part of a full domain.
In www.example.com, the TLD is .com
In www.webalive.com.au the TLD is .au
There are two types of TLDs:
- Generic Top Level Domains or gTLD (like – .com, .org, .net etc)
- Country Coded Top Level Domains or ccTLD (like – .au, .us etc)
Some ccTLDs require a second level part with them (notice the .com.au example).
But what type of TLD you should use?
- If you are not focusing on a local consumer base, use .com. .com is hands down the most trusted gTLD. As of May 2017, 47.6% of all websites use a .com domain.
- If your site wants to focus on a certain geographical location, then you can use a ccTLD.
For example: Take a look at our own web address: www.webalive.com.au. We use a .au ccTLD because we primarily serve Australian clients.
Obviously, if you already have a domain, choosing .com isn’t an option. But don’t worry too much about it as this is just one small piece of the SEO puzzle.
Still, in some cases, a .com TLD conveys more trust and authority which is good for SEO. This is something to keep in mind when choosing your future domains.
2. Make your URLs short
What are the lengths of your URLs? Technically, a URL can have up to 2083 characters. But shorter ones rank better.
In 2016, Backlinko analyzed over 1 million Google search results. Their research clearly showed that Google favours shorter URLs.
Ideally, the length of your URLs should be about 50 to 60 characters.
What about words? How many words should they have?
Let’s have a look at this question with an example.
Here is the URL of one of our blog posts:
The title of the post is “Ecommerce UX: 4 Easy Tips to Boost Your Store’s Conversion”. When we were posting the article using WordPress, this was the default URL:
The suggested URL had around 10 words taken from the article title. We edited the path and reduced that to 3.
Always try to summarise your titles in 3 to 5 words, separated by dashes. This applies to any sort of page that your site may have, not just blog articles. Long URLs aren’t user-friendly.
In short, here are the key points regarding the length of SEO friendly URLs:
- Character limit: 60
- Number of words in the path: 3 to 5
- The words should be separated by hyphens (not underscores)
Google recommends using hyphens to separate words in any web address:
3. Use only the safe characters
Technically speaking, a URL can have any of the following characters:
Alphanumeric characters: A – Z a – z 0 – 9
Special characters: $ – _ . + ! * ‘ ( ) ,
Reserved characters: ; / ? : @ = &
The reserved characters can be used only for their specific purpose. For instance, the question mark (?) is used at the beginning of a query string.
Thus, you are basically left with the alphanumeric and special characters. You can use these freely without any technical difficulties.
Having uppercase letters in URLs may cause 404 error in some servers. So, the best practice is to use lowercase letters.
You should also know that there are some unsafe characters that should never be the part of any well-crafted URL.
Avoid blank spaces.
When you upload an image or file, your CMS automatically creates an address for the file.
Suppose your image name was “seo tips.png”. Note that there is a blank space in the file name.
When turned into a URL, this becomes “seo%20tips.png”.
As you can see, the whitespace character is expressed as %20 in the URL.
In order to make your URLs readable and user-friendly, replace all blank spaces with dash (-). Edit your file names before uploading. In this example, the image name should be “seo-tips.png”.
4. Focus on readability
Make your URLs readable for humans.
What does that mean?
Rand Fishkin explained that perfectly with this scale of URL readability diagram:
The key point is –
When someone reads your URL, they should be able to easily understand what the page is about. It should be optimised for both the humans and search engines.
It is often suggested that you shouldn’t use Stop words in URLs. Stop words are – a, an, the, for, of, but etc. If you can do without these words, remove them. But never sacrifice readability to avoid stop words.
For example, here is one of our blog post URLs:
Note that we have used the stop word for in the URL. This is because it makes the URL more readable.
5. Use fewer folders (2 max)
Let’s first explain what we mean by folders. Here’s an example URL with two folders:
Every slash in a URL denotes a folder. (Though in some cases there can be an extra trailing slash at the end.)
Folders help you organise your website’s pages. But overusing them reduces URL readability and confuses the search engines.
SEO friendly URLs should never have more than 2 folders.
Look at this one:
Though it looks organised, the page is under three levels of folders. This formation is neither user-friendly nor good for SEO.
Consider the alternative:
The second URL conveys the same information. But it’s more readable and SEO friendly.
Some sites include dates in their URL. Especially for blog posts. This is not a good practice and should be avoided. Here is an example:
Including dates is unnecessary.
Readers usually don’t even notice the dates in a URL. And Google has other ways to identify when your article was published.
Dates increase the number of folders and the URL length. It also hampers readability.
The product pages of an ecommerce site or online shop can use any of the following two structures:
Both are good. Once you choose a format, maintain consistency.
If you have products of various types, then it might be good to include one category folder. Or at most two, if really necessary.
For blog articles, you should use any of the following formats:
- www.mysite.com/blog/article -title
Anyway, if your site is completely focused on blog publication, then the following structure may be more appropriate –
- www.mysite.com/article-catagory/article -title
6. Include keywords but avoid stuffing
SEO friendly URLs should contain keywords related to the page content.
Oftentimes, people will post a page link on the internet or social media without using any anchor text. Including the keyword helps people understand what the page is about by looking at the link itself.
A link that includes keywords is also favoured by the search engines. Bryan Dean mentioned this at number 51 in his Google Ranking Factor study.
- Use only those keywords in the URL which are relevant to the content of the page
- It’s better to include the main keyword at the beginning of the path or filename
- Never repeat a keyword. And don’t target too many of them
Let’s examine the address of this blog post:
If anyone reads this, they can easily understand what the page is about. In fact, seo friendly urls is the target keyword phrase for this article.
What if we had something like the one below?
Not a good example.
The folder name seo is supposed to denote the article category. But that makes the keyword seo appear twice in the address, which is not a good idea. Keyword stuffing a bad practice and should be avoided.
7. Implement HTTPS
Every URL begins with either HTTP or HTTPS.
When your site has an SSL certificate, its URLs will begin with HTTPS. The browser also indicates that it is a secure site.
And this is crucial for SEO. Google announced HTTPS to be a ranking factor back in 2014.
In fact, in the SEMrush Ranking Factors Study 2017, HTTPS is mentioned as the 10th most important ranking factor.
When your site has HTTPS, information on your website will be encrypted. This means that people are more secure when visiting your site.
And Google always boosts user-friendly factors.
In their own words – “… we called for “HTTPS everywhere” on the web… we’d like to encourage all website owners to switch from HTTP to HTTPS to keep everyone safe on the web.”
So it’s absolutely important to have SSL on your site.
The following diagram illustrates what happens when your site is SSL-enabled (i.e. has HTTPS):
You can see, for normal HTTP sites, a snooper can read the data that a user sends to or receives from your site’s server. Because HTTP sends data in plain text.
But in the case of HTTPS, that data gets encrypted. So, even if an intruder reads those, they won’t understand anything.
The bottom line is – SEO friendly URLs need to have HTTPS.
This article from Yoast will give you more information regarding how to implement HTTPS on your site.
8. Omit filename extensions
You might have noticed that some URLs end with filename extensions. Like .asp, .php or .html. If your pages have such extensions, you should remove these.
Suppose you have built your site using ASP.NET. And your web pages have an extension .asp.
What happens if you want to move to a PHP based framework? Your page extension will change to .php.
This type of changes will require you to set 301 redirects. So that if someone types your old address, they get redirected to the new one.
Moreover, each time you make such changes search engines need to reindex your pages.
By excluding the extensions altogether, you can easily avoid these issues.
Now even if you move from one technology to another your page addresses won’t change.
Ideally, addresses should be independent of implementation or framework being used in the backend.
URLs without file extensions look more clean, readable and supposedly have a better click-through rate.
Sometimes, an address may contain a file that needs to be downloaded at the user’s end. For example, your site may have a pdf file that you want your visitors to download. In that case, the URL should actually have the file extension, like https://wwww.example.com/file1.pdf
9. Make your URLs similar to the page titles (up to a reasonable degree)
The title of your page should match the URL and vice versa. But this doesn’t mean you should copy the entire title word for word and put it in the URL. Because as we mentioned earlier, ideally SEO friendly URLs should be on the shorter side.
Here is an example from Neil Patel:
Page title: The Only 6 Keyword Research Tools You Need to Use
Note that, the title and URL are quite similar, but not the same.
What if the URL of that page was https://neilpatel.com/blog/find-keywords ? Though short and simple, it’s not a good choice.
The main point is, your page title and URL should not be completely different.
10. Block dynamic and infinite-space URLs
Suppose you are visiting a website that lets you book hotels. You search and the result gives you a list of hotels. If it’s a large website, you’ll expect to find some kind of filter or sorting mechanism to help you refine your search result page.
For example, you may want hotels at value rates. You can even be more specific. But each time you add a new filter on top of another, the resulting URL gets an additional part.
Here is a possible example of how URLs change when you apply filters:
Thus a site can have an unnecessarily large number of URLs with more or less similar contents arranged in different ways.
This causes problems for the Google crawler. The crawler sees a huge number of pages with different URLs. But all those pages have similar contents.
These URLs, which generally result from a query in the site’s database, are called dynamic URLs.
Some sites have a calendar that can dynamically create pages based on dates. And this may result in an unlimited number of URLs possibly being created if there is no restriction. These are called infinite-space URLs.
Both dynamic and infinite-space URLs are going to hurt your SEO.
You can block these URLs by editing the robots.txt file. It’s recommended that you prevent the Google bot from accessing these pages by using regular expressions with the nofollow attribute. You can also use the canonical tag to handle some dynamic addresses.
11. Prefer subfolders to subdomains
Suppose your site has a blog. Now, the URL of the blog can be either –
The address www.example.com/blog represents a subfolder or subdirectory of your site.
And blog.example.com is a subdomain.
There have been some debates regarding which one is better for SEO. Google seems to have no definite stance on this issue.
But in practice, subfolders are better than subdomains.
The first part of this Whiteboard Friday video on SEO friendly URL structure from Moz explains this topic –
There is one particular case where a subdomain is a better choice than a subfolder.
Suppose your business, mybusiness.com, wants to expand its sales operation in France. There are three options how you can set up the URL for your French customers:
- Country-specific subfolder:
- Country-specific subdomain:
Which one is the best choice?
Of course the ccTLD one. But it might be expansive or unavailable. Moreover, ccTLDs usually have several legal issues and pre-set requirements.
If you can’t get the ccTLD, your second best option is to have a subdomain (not a subfolder).
Here’s why –
A subdomain can work as a separate site. You can even host it at a different server location. That is not true for a subfolder. Also, from a visitor’s perspective, fr.mybusiness.com looks more location specific than www.mybusiness.com/fr
Don’t forget to target your search results to your specific country. For ccTLDs Google will automatically associate your site with a geographical location. But when you are using a subdomain, you’ll have to do that manually from the Search Console.
12. Use redirections and canonical tags properly
- You should use a 301 redirect if you have multiple URLs leading to the same page.
When a user wants to visit your site they may type any of the followings – www.mysite.com, mysite.com and https://www.mysite.com. But all those addresses are actually different. So you should choose one particular address (preferably the https one) and use 301 redirects to send traffics from other addresses to it.
Now if someone tries to visit mysite.com or www.mysite.com, they will be automatically taken to https://www.mysite.com. Merging different versions helps to improve the SEO authority of your site and is a must for optimum user experience.
- You should use a 301 redirect if you have deliberately changed the URL of a page.
Let’s assume after reading this guide you decided to change the address of a page of your site. The previous URL the page was www.mysite.com/randompage (address A). And you changed that to www.mysite.com/about-me (address B).
Now you should set a 301 redirect from address A to address B.
Because people may have already bookmarked or used URL A on the internet. The page might have received many backlinks too. If you don’t set a 301 redirect, you will lose all the traffic and link juice that may come through your that previous address.
- Don’t chain together too many 301 redirections
It’s not ideal to create long redirect chains. If address A redirects to address B, it’s absolutely ok. Then if address B redirects to address C, that is fine too. But if you continue the redirection chain from address C to D, then this is no longer ideal.
Google bot will follow one, two or maybe three redirects perfectly, but then it may decide to stop. So, keep your redirect hops to one or two steps.
Additionally, longer redirect chains are also not user-friendly. It slows down the browser and the viewers experience an unnecessary delay.
This video from Google Webmasters explains the problem with multiple redirects –
- Use Canonical tag to handle duplicate content
Often times your site may have multiple pages with same content. Here are some common cases:
You have an ecommerce site that has similar products with similar descriptions on different pages.
You have a blog site, and there are same blog posts in two different categories with different URLs.
A page of your site has another printable or PDF version.
In these cases, you should use the rel=”canonical” tag.
If page A is your main page and page B has duplicate content, then you should insert the following code in the HTML of page B:
<link rel="canonical" href=https://www.mysite.com/page-a/>
What is the difference between 301 and rel canonical?
301 redirect is also known as the permanent redirect. When you set a 301 redirect from URL A to B, you redirect both the search engine crawlers and visitors from A to B. And the URL A itself doesn’t have any content and can’t be visited.
When you use a canonical tag in page B (directing to page A) then you redirect only the search engine bot from B to A. Both pages A and page B remain accessible. But the search engine will rank page A only.
URL optimisation may not seem like a big part of SEO, but it is very important. A site with good URL structure adds to its usability. And we all know, user-friendliness is possibly the most important factor when it comes to ranking in search engines.
As you can see, apart from a few technical aspects, crafting SEO friendly URLs is not that difficult. We hope you have found the points we mentioned above to be useful in improving your search engine optimisation strategy.
Do you need help regarding any of the topics discussed above? Post your questions in the comment box below. We are always happy to help our readers!