So, keep on reading.
What Are URLs?
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 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?
So, are they?
Well… yes, they are.
What’s really important is what’s behind that URL #thecontent.
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.
Structure is related to your URLs, but also to click depth, which we’ll soon talk about.
Then, just follow a simple list of best practices (which I’ll share with you soon) when creating new URLs.
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.
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.
What you need to understand is that there’s a big link between URLs and content.
Can You Have the Same Content on Different 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).
That’s why, for big eCommerce websites, it’s a good idea to separate the products from the categories. This way you could have:
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!
Many SEOs say that URLs are important for a user’s experience. Let’s see why.
You’ll rarely type in https://cognitiveseo.com/blog/category/case-studies/ in the browser to access that page.
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.
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.
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.
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.
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.
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.
Click Depth is also technical, but it reflects the human behavior, more specifically users’ interaction with your website.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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
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.
Using ‘bad’ characters
Browsers only support certain characters in the URL.
It’s best to avoid parameters and complicated URLs, at least for the pages you want to be indexed and ranked well.
Using too many subdirectories & categories
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 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.
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.
A better option would be:
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:
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.
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.
It’s also a good idea to add the main keyword in the URL, if you have one and it also has searches.
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.
CognitiveSEO Site Audit URL Analyzer Tool
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.
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.
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
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.
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
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
If you want to know more about the subject, read this article about Google trying to remove URLs.
- Apple announces Mac transition to Apple silicon - June 28, 2020
- Twitter Rolling out Audio Tweets | Twitter Updates - June 19, 2020
- Facebook Adds Option to Send Marketing Emails via Pages App - June 3, 2020
Follow Me on Twitter @Director_Roshdy