Hey, we get it. The URL structure is a difficult SEO topic. It’s not easy to master, but not impossible, either.
In fact, we’re here to make things easier for you.
In this article, we’ll try to answer all your questions and provide examples for a better understanding of how the structure of your URLs influence your SEO strategies.
Even if you own an eCommerce website or are struggling with Local SEO and WordPress, after reading this article you’ll know how to set up your website’s URL structure for great SEO results.
So, keep on reading.
- What Are URLs?
- Why Are URLs Important for SEO?
- Does URL Structure Affect Google Rankings?
- URL Structure & User Experience
- URL Types: Static URLs vs. Dynamic URLs
- Click Depth vs. URL Structure
- Subdomains vs. Subfolders
- Trailing Slash vs. No Trailing Slash
- Best URL Structure for Local SEO & WordPress
- The Best URL Structure for eCommerce Websites
- URL Structure Mistakes
- Best URL Structure for SEO (Tips & Tricks)
- Does Google Plan to Get Rid of URLs in the Future?
What Are URLs?
A URL (short for Uniform Resource Locator) is the address of a resource on the internet.
You can think of it as a regular address, for a house.
Servers and browsers use URLs to access web pages and resources on the web. You type in an address, you reach a web resource. It’s pretty simple on the surface.
Now, of course, there are a lot of technical aspects to Uniform Resource Locators. However, most of them aren’t an issue for the regular web developer, since they’re handled well by servers and platforms these days.
Because platforms make it so ‘easy’, the URL structure of a website is often neglected. It’s not easy to understand and nobody tells you why you should pay attention to it.
People end up with big sites and bad URL structures and, unfortunately for them, URL issues are pretty nasty.
Because they require a lot of patience and double, if not triple check-ups to make sure nothing goes wrong.
If you mess things up, you can end up with a big drop in all your rankings.
So, it’s a lot better if you get things right from the beginning instead of fixing them later, when the site is big.
Why Are URLs Important for SEO?
A lot of search engine optimization experts say that the URLs are very important for SEO.
So, are they?
Well… yes, they are.
A URL is important as it’s a link between the user and your content.
Google shouldn’t really care what your URL is as long as it’s compliant, indexable & unique. But what does this mean exactly?
What’s really important is what’s behind that URL #thecontent.
Many say the URL needs to be short but, in my personal experience, Google handles long URLs just fine. And they can rank well too.
So, only “refining” your URLs constantly won’t help you very much to achieve true SEO success.
There are other, more important, OnPage SEO tasks to attend to.
What Google actually cares about in relation to your URLs is your site’s structure.
Structure is related to your URLs, but also to click depth, which we’ll soon talk about.
The good thing with URL structure is that you just have to set up things right once (for the bigger picture).
Then, just follow a simple list of best practices (which I’ll share with you soon) when creating new URLs.
Does URL Structure Affect Google Rankings?
URLs can definitely impact SEO.
There are a number of issues that are related to URLs that can affect your rankings. Two of the most important ones are keywords and length.
First of all, you have to make sure that your URLs are valid. Only use the allowed URL characters. If you don’t know what those are, then the best thing to do is to stick to letters, numbers and dashes. Not underscores, but dashes.
As Google recommends:
Consider using punctuation in your URLs. The URL http://www.example.com/green-dress.html is much more useful to us than http://www.example.com/greendress.html. We recommend that you use hyphens (-) instead of underscores (_) in your URLs.
Keywords in the URL can also help you rank better for a specific phrase. For example, if I want to write for “Site Explorer” it’s a good idea to have my URL as /site-explorer.
Having something completely irrelevant in the URL can negatively impact the rankings of that page, as the URL should be descriptive of the content within the page.
So that’s why it’s a good idea to do some keyword research before writing your URLs. You can use our Keyword Research Tool.
Another important factor is the URL length. This isn’t an official ranking factor, but there is a strong correlation between shorter URL length and higher rankings.
It’s a good idea to read this entire article to find out how to have the best URL structure for your website, as it can definitely have an impact on your rankings on the long term.
A URL has to be unique. Well… there’s no other way around it, actually. You can’t have two of the same URL and not land in the same place.
What you need to understand is that there’s a big link between URLs and content.
Google likes mapping content to a single URL. That makes it unique.
Can You Have the Same Content on Different URLs?
Have the same piece of content on different URLs and Google won’t like it.
For example, duplicate content is mostly considered a content problem when, in reality, it’s strongly linked to URLs.
Don’t believe me? Let me show you what I’m talking about:
You have a product that fits two categories on your site. That’s perfectly fine. However, if your standard website URL structure is an hierarchical one, then the product might show on two different URLs (with the same content).
So we could have a plant-A in the category green-plants but also in tall-plants. If the URL structure is hierarchical, it will look something like this:
This way, domain.com/tall-plants/plantA and domain.com/green-plants/plantA both host the same content, which makes it duplicate content.
That’s why, for big eCommerce websites, it’s a good idea to separate the products from the categories. This way you could have:
Talking about ecommerce, if you need to extract data from ecommerce websites, check out this article.
This issue above is strongly related to structure. If you structure your website in a hierarchical way without considering the above mentioned, you’re bound to have duplicate content issues.
Of course, sometimes you can use hierarchical structures to your advantage, such as when you have a simple local website with presentations.
If you know that ‘logo’ and ‘design’ are bound to the ‘branding’ category and ‘ads’ and ‘seo’ are bound to the ‘digital marketing’ category, then there’s no issue in keeping them like that. It actually makes sense to do so!
URL Structure & User Experience
Many SEOs say that URLs are important for a user’s experience. Let’s see why.
Usually, you end up on a website either through the root domain name or from another website, through a link.
You’ll rarely type in https://cognitiveseo.com/blog/category/case-studies/ in the browser to access that page.
Most probably, you’ll go there through the Google search results or via our navigation menu.
Even if it was for you to access that URL from another website, it would probably be under an anchor text, like this: SEO Case Studies.
Google has been making efforts to shorten/hide the display of URLs in the browser, if not removing URLs altogether.
(Yes, indeed… well talk more about this at the end of the article.)
Sure, a very long URL can look shady and discourage people from clicking it.
What would you rather click?
Well, if it comes from a reliable source (such as a friend), you’ll probably click it. But otherwise, most likely, you won’t.
From what I know, the longest URLs on the web are Google search results pages and links with Facebook ID parameters. Please feel free to share your opinion on this matter on the comments section below.
URLs are, however, important for a blogger’s experience.
If you want to get backlinks, you want to make your URLs appealing.
You don’t want to discourage a blogger to share your post on social media or link to your site from their blog posts.
That’s what I think an ‘SEO Friendly URL’ means. So keep your URLs pretty.
URL Types: Static URLs vs. Dynamic URLs
URLs can be split into two categories. You have dynamic URLs and static URLs.
But which ones should you use?
Websites, especially eCommerce stores, have both static and dynamic URLs.
In fact, any platform which has a database probably has some sort of dynamic URL protocol.
So if I set up a basic HTML website, those would be true static URLs. When I have a platform with a database and I’m trying to pull information from that database (let’s say eCommerce filters, such as colors and sizes) the platform will generate dynamic URLs.
In Google’s eyes, all URLs are ‘static’. Once they’re indexed, it’s done. Change it without a 301 and Google will consider it gone and derank it.
The issue with dynamic URLs is that there’s an infinite amount of URLs that can be generated. That happens because of filters.
If you’re not careful, you won’t be able to keep track of them easily.
It’s a good idea to avoid too many parameters in a single URL. Limit them to 2 or 3.
This usually occurs when people add too many irrelevant filters and index too many pages.
Most of the time, people index all the parameters, which is a bad practice. Why index a page if it doesn’t have any searches?
Make sure that the parameters you’re letting Google index actually have searches. So if you have a sweater in 10 colors, see if people search for all those colors.
If not, index only the ones that do have searches.
Thus, if people only search for ‘red sweaters’, then you will only index domain.com/shop/sweaters?color=red. This means that ?color=blue, ?color=black would remain unindexed.
Moreover, keep your parameters in an absolute order!
What does that mean? It means that if your user selects the color first and then the size, the URL will be ?color=red&size=small but if he selects the size first and then the color, the URL will still be color=red&size=small.
So the order of the parameters in the URL doesn’t change. It’s the better option.
Sometimes, it’s not easy to set up a proper faceted navigation that benefits both the user experience and SEO.
If you want to set up a filtering menu properly, read this article about Faceted Navigation & Filters.
Keeping an absolute order is not always easy to achieve. You’ll need a good web developer.
In case you can’t keep absolute order for parameters, canonicalization is an easy alternative.
So if you have both URLs (?color=red&size=small and ?size=small&color=red) you can just pick one as the main URL.
Remember to also self canonicalize the main URL.
Therefore, if ?color=red&size=small is our main URL, it would have a rel=”canonical” to ?color=red&size=small and then ?size=small&color=red would have a rel=”canonical” to ?color=red&size=small.
Confusing, I know, but very important. You can find out more about canonical tags & URLs here.
I want to make sure I also cover 301 redirects in this article, because they’re really important.
If you simply move a web page from one URL to another, Google will just consider the old page gone and the new page a fresh one.
This means that it has to rank it again, which means you’ll lose the rankings of the old one and have to put up all the work again to rank the new one.
To keep the rankings and make Google understand that the old page simply changed its location, you have to use 301 redirects.
You probably know all that, but you’d be surprised how many people forget to properly 301 when merging websites. This has catastrophic consequences, so make sure you properly 301.
It’s also a good idea to avoid redirect chains. So, it’s better to have A > C and B > C than A > B > C.
If you’re looking for SEO tools that can trace redirect chains, the CognitiveSEO Site Audit is a good choice. You’ll find what you need under Architecture > URLs / URL Chains.
Click Depth vs. URL Structure
URLs are about technical SEO. Not so much user oriented. Click depth, on the other side, is very user oriented.
Remember when I said that click depth also matters in the site’s structure?
Your site’s structure reflects itself in the click depth and your users react to it.
The more users have to click to get to where they want, the less likely they are to convert.
The same thing goes with Google. The deeper the click depth to a page, the less important Google thinks it is.
Click Depth is also technical, but it reflects the human behavior, more specifically users’ interaction with your website.
Click depth matters for SEO. We could even say it’s one of Google’s ranking signals. In fact, Google official John Mueller said it himself.
Now if you read my stuff in general, you know I’m not a big fan of just going after what John Mueller says.
However, in this case, there’s a lot of proof to back it up.
Breadcrumbs can be a sketch of your site’s structure.
There are multiple ways you can implement breadcrumbs on your site.
The first would be in relation with the URL and site structure and the second in relation with the user’s click path.
It’s better to implement the first one, in general. A user’s click path can also be followed via the back and forward buttons in the browser.
You also have more control on making the breadcrumbs useful to the user if you structure your site properly.
For example, if you list the featured product Tuna on the Homepage and the user clicks it, a history based breadcrumb system would generate Home > Tuna.
Not very useful if the user also wants to see other types of fish.
Instead, if I have the domain.com/categories/fish/tuna I can have Home > Categories > Fish > Tuna, regardless of where the user comes from on that page.
The breadcrumbs can (and should) be hierarchical, even if the URL structure isn’t.
This means that I can have domain.com/shoes/running/ and domain.com/products/nike-xyz
Home > Shoes > Running > NikeXYZ where ‘NikeXYZ’ would link to domain.com/products/nike-xyz, ‘Running’ would link to domain.com/shoes/running and ‘shoes’ to domain.com/shoes, while the Home breadcrumbs will link to domain.com.
You can see how the site’s structure doesn’t always reflect in the URL path.
Subdomains vs. Subfolders
When structuring your site, there’s always the option of using subdomains.
A subdomain is what’s before your root domain name. Thus, tools.cognitiveseo.com is a subdomain, while cognitiveseo.com/blog is a subfolder.
Subdomains act… sort of like separate websites.
Many say there’s no difference between using subdomains vs. using subfolders, but many have also brought proof that it’s safer to use subfolders.
If your internal links strategy is set up properly, subdomains should also work very well.
While subdomains can rank properly, if you don’t know what you’re doing it’s better to stick with subdirectories.
Trailing Slash vs. No Trailing Slash
I’m just going to keep this short: it doesn’t matter.
Just make sure you keep it consistent and properly 301 to the main version.
Google treats https://cognitiveseo.com/blog/23628/url-structure/ and https://cognitiveseo.com/blog/23628/url-structure as separate URLs.
If you don’t use 301, both pages will get indexed and they will cannibalize each other.
In the old days of the internet, most web pages would have an extension as they were all seen as file names (such as page.html).
The trailing slash would represent a folder instead of a file, but today that’s not the case anymore. Just be consistent and 301 properly.
Relative URLs vs. Absolute URLs
Links can be absolute URLs or relative URLs.
Absolute URLs include the protocol, subdomain, subfolder and everything else after.
An absolute URL would be https://www.website.com/page/subpage/.
A relative URL would be /page/subpage/.
It’s very important to use relative URLs only on your website and absolute URLs on other websites.
So, if you do link building to get backlinks, make sure you always use absolute URLs.
If you use absolute URLs as part of your internal linking strategy, when you change your domain, those absolute URLs will remain, thus still linking to the old domain.
Sure, you will have 301 redirects set up, but it’s always better to have the new domain in all your internal links.
So make sure that when you do internal linking, you use relative URLs if possible, so when you make any changes to your domain, the platform can take care of everything and you won’t have to manually replace thousands of links.
Best URL Structure for Small Sites, Local SEO & WordPress
Small websites can have hierarchical URL structures, as previously mentioned. Just make sure you won’t cause duplicate content issues.
If you’re targeting multiple locations, then you should have separate pages for each location you’re targeting.
I know, many might say that these are doorway pages and that Google penalizes them.
However, they’ve been proven to work countless times. There’s also no alternative to doorway pages.
Keep it relevant and Google will reward you.
If you have a WordPress blog, then you most probably want to keep the pages immediately after the root URL.
We’ve separated our blog under /blog because we have a separate WordPress install in /blog which makes it impossible for us to place article URLs immediately after the root domain name.
You might also notice the numbers after the blog. That’s an identifier, which was a technical necessity some time ago. It’s better if you don’t have those.
So, if you can, go for https://cognitiveseo.com/url-structure/ instead of https://cognitiveseo.com/blog/23628/url-structure-seo/.
If you’re wondering why we’re not doing this, here’s the answer: We could remove them, but it would require a big effort mapping all the articles for 301 redirects and we don’t consider this would have a big / positive impact on your rankings.
Our website has multiple functionalities and is pretty big and complex. We have our tools landing pages in our root domain, so it makes sense to separate our blog in the /blog subdirectory.
If you just have a blog, then keep URLs immediately after the root. Brian Dean’s blog on Backlinko.com is a good example.
Avoid using the date in the URL if your post is evergreen. This will discourage users to click your result in the future and will also make Google think your content is ‘old’.
The Best URL Structure for eCommerce Websites
When it comes to eCommerce websites, things aren’t that simple with URLs.
The safest way to go for it is to separate each section in its own subdirectory.
This means that you’ll need a /blog/ or /articles/ prefix for your articles and posts, a /products/ prefix for your products and a /categories/ for your categories and so on.
This helps you keep track of your pages. If you every crawl your website to analyze it… it will be a nightmare to analyze the information if all the post types were in the root domain.
Make sure you don’t add too many subcategories. Remember, try to keep the click depth … shallow.
Take advantage of the breadcrumbs recommendations I’ve made above.
Make sure you know exactly which URL parameters/filters you index and which you don’t.
You should definitely read this article about Faceted Navigation for SEO
URL Structure Mistakes
There are some things that you must definitely avoid when creating your URL structure.
Here’s a list of the top biggest mistakes that webmasters make when they create their URLs.
Changing URLs without 301
As you’re on a page about URLs, if your structure is bad or you’re contemplating on changing it, then I can’t stress this enough.
Your rankings will drop if you don’t properly 301 from the old pages to the new ones.
Remember, if you change the URL, you MUST use 301 redirect from the old one to the new one.
Having multiple variants
One problem that many websites have is not properly redirecting all the variants of the site to a single one.
For example you can have HTTP and HTTPS and then with WWW or without WWW.
This results in 4 versions which Google sees as separate sites, in a way:
Make sure you pick one and 301 redirect all the others to it.
You can read more about which version you should choose in our article about WWW vs non-WWW .
Having multiple URLs for the same content
Sometimes, it can happen the different URLs have the same content. This is called duplicate content and it can happen often in eCommerce websites.
You can have, for example, two filter parameters such as ‘red’ and ‘small’.
However, if all your red products are small and all your small products are red, those pages will mostly be identical.
This is just a hypothetical example, but things can scale pretty quickly, creating hundreds if not thousands of very very similar URLs with not much value.
If you want to read more about how to fix this issue, check out our Faceted Navigation Guide.
Using ‘bad’ characters
Browsers only support certain characters in the URL.
Most content management systems know how to handle these and will strip them from the URL if you add them unknowingly.
It’s best to avoid parameters and complicated URLs, at least for the pages you want to be indexed and ranked well.
Google can handle parameters with numbers and other characters, but most of the pages you want to rank high for very competitive keywords should be static URLs with keywords in them.
Using too many subdirectories & categories
If you have an eCommerce website, try to keep things short. Don’t add hundreds of layered subcategories. Only add the important ones.
A good idea to know which ones are important is to do proper keyword research. If nobody searches for those terms, maybe don’t add them as subcategories.
You might have some granular structure that seems important, but if users only search for the 5th level, then maybe make it the first or the second and cut the other ones.
Keeping everything in root domain
When you create the structure of the site, make sure to separate different articles
Some web masters consider that the shorter the URL, the better. But not in every case!
If you have a blog on a certain topic, such as Backlinko.com, it might make sense to keep everything in the root domain. You have very few pages and it’s easy to manage.
However, if you have a big site, and you have services, products, articles, locations and so on, it will be a nightmare to analyse the website after a crawl if everything is in the root domain.
Not using keywords or using too many keywords
Make sure you have some of the most important keywords the users are searching for in your URL.
Not having keywords at all is a very bad idea, especially if you have only numbers, or dates or so.
So if you have an article about really good rock bands don’t let your URL be site.com/03/03/2020/article-1523 but instead have it site.com/top-5-rock-bands-2020.
On the other side, it’s a good idea to not have the keywords too many times. It looks spammy and Google can pick up on that.
Avoid creating duplicate iterations of the keywords in the URLs.
This can happen often on eCommerce websites, when creating categories and not editing their URLs.
The content management system will just pick up the title of the page, and the hierarchical URL structure will look like this.
A better option would be:
Best URL Structure for SEO (Tips & Tricks)
There is no clear best URL structure for SEO as this depends on very many factors. However, in order to maximize the search engine optimization benefits, make sure to follow these best practices for SEO friendly URLs.
Use Keywords in Your URLs:
Keywords are very important for SEO. It’s a good idea to add them in your URL. These URLs are called semantic URLs.
It’s more important to have your target keywords in your title tags and content than in the URL.
However, adding them in the URL can bring some benefits:
For once, if users look just at the URL, they’ll know what it’s about.
If you do link building to your page without using keyword rich anchor texts, the URL will act as the anchor text so it’s a good idea to have the keywords there!
You can simplify URLs by removing short or less descriptive words such as stop words. Here are some stop words examples: to, the, how, and, for, it, a, why.
For example, instead of /how-to-jump-really-high/ you could just go for /jump-higher/ or /improve-jumping/.
You don’t always have to remove the stop words from your URL.
For example, you might have the target keyword “how to cook” where the URL domain.com/how-to-cook/ is just perfect.
It’s also a good idea to add the main keyword in the URL, if you have one and it also has searches.
In this case, it fits my article: people search for “url structure seo” and my URL is /url-structure-seo/.
But people also search for “how does URL structure affect SEO”. Why didn’t I choose this keyword phrase as my URL?
Because the first one has more searches 🙂 I’ll let you figure out the rest.
If you’re looking for SEO tools that can check that for you on a large scale, make sure to check out CognitiveSEOs Site Explorer. You’ll find what you’re looking for in the Architecture > URLs section.
Keep the URLs Short:
The popular opinion is that shorter URLs rank better.
While I personally still have to investigate this matter, I still keep my URLs short and to the point.
Why? Because they are better for user experience. Here’s how our most important pages URLs are:
On a WordPress platform (not our case for the main site), they would be generated using data from the post title.
Content management systems such as WordPress would strip some elements that are incompatible, so they would be like this:
Not… horribly, but not very good either.
And it’s also on the safer side to keep them short. If URL length does actually matter for OnPage SEO, better have it short rather than long, right?
While there’s a correlation between shorter URLs and high rankings, it doesn’t 100% mean it’s because of the shorter URLs.
Maybe very well optimized sites also like to have prettier, shorter URLs.
However, don’t try to make them too short. For example, some use /p/ instead of /products/ and /c/ instead of /categories/.
I don’t think that’s necessary. In fact, I consider it looks more spammy.
Too short might also mean removing some important keywords
Keep URLs Unique
Make sure you don’t already have very similar pages before you write and publish a new page.
If you do, it might be a good idea to better optimize the other page instead, or target a different topic/set of keywords for the new one.
Use Hyphens Instead of Underscores & Avoid Special Characters in Your URLs
Hyphens and underscores look very similar, but on the internet they’re treated pretty differently.
Google recommends that you should avoid underscores in your URLs. They can cause issues.
Underscores are treated as word joiners by Google, while dashes as word separators.
People are also used to dashes more. So your URL should be url-structure-seo not url_structure_seo.
Also, avoid any special characters in your URL, except the basic ones used for parameters and anchors such as ? & = #.
Most platforms won’t even let you do it but, if your URL contains characters such as , or ; or ‘, it can cause problems.
If you don’t know what a special character means or does in a URL, then it’s better not to use it.
Of course, there’s also the trailing slash /, which is ok to use.
Use as Few URL Parameters as Possible
Parameters can add to length and they also make a URL look
However, in certain situations, they also add keywords in your URL which can be a good thing if people search for those keywords.
Remember to only index the pages people actually search for instead of every possible filter combination your site can come up with.
Prioritize & Think about Click Depth
Don’t add too many deep pages, such as subcategories inside subcategories #inception.
Keep it short and to the point.
If you do have a lot of deep pages which are important, make sure you use internal links in your blog posts or other sections of your website so that Google can properly find them.
You can also share these pages on social media or other websites from time to time.
Avoid Hierarchical URLs When You Have a Site that Changes Often
This goes mostly for eCommerce or any site that is very dynamic, such as news sites, car trading sites, events sites, etc.
You can use hierarchy if you’re sure a resource won’t change its parent.
Don’t Stuff Keywords in Your URLs
Keyword stuffing is bad in content, bad in title tags and bad in URLs.
Don’t do it!
Sometimes, people stuff in keywords in their URLs by mistake.
I’m not sure it’s the best example, but I hope you get the point.
Instead, maybe go for something like: randomshoeswebsite.com/shoes/running/women/nike/red/.
Avoid Duplicate, Similar & Thin Content
Again, duplicate issues are mostly caused by poor URL structure implementation, bad canonicalization and indexation practices.
Make sure you don’t have very similar pages on your website or they will impact your overall website SEO performance.
If you’re looking for SEO Tools that can fix duplicate content issues, then the CognitiveSEO Site Audit Tools is perfect for you. You can find what you’re looking for under the Content Section.
Does Google Plan to Get Rid of URLs in the Future?
It might be the case that, in the future, Google will pursue its dream of getting rid of URLs.
The first step would be not to display them at all, first in the search results and then in the browser itself.
However, getting rid of URLs
This all started with Google AMP, where Google caches the resources on their web servers, therefore displaying them on their ugly URLs, which they then hid.
If you want to know more about the subject, read this article about Google trying to remove URLs.
The URL structure of your website is important. Don’t neglect it! You only have to set it up right once.
Once you structure things properly, just follow the best practices. Add your target keywords, think about URL length, avoid keyword stuffing, limit irrelevant URL parameters and you’re good to go.
How did you set up your URL structure? Let me know in the comments section below!