Imagine you work for an e-commerce company.
Wouldn't it be useful to know the total organic sessions and conversions to all of your products? Every week?
If you have access to some analytics for an e-commerce company, try and generate that report now. Give it 5 minutes.
…
Done?
Or did that quick question turn out to be deceptively complicated? Did you fall into a rabbit hole of scraping and estimations?
Not being able to easily answer that question — and others like it — is costing you thousands every year.
Let’s jump back a step
Every online business, whether it’s a property portal or an e-commerce store, will likely have spent hours and hours agonizing over decisions about how their website should look, feel, and be constructed.
The biggest decision is usually this: What will we build our website with? And from there, there are hundreds of decisions, all the way down to what categories should we have on our blog?
Each of these decisions will generate future costs and opportunities, shaping how the business operates.
Somewhere in this process, a URL structure will be decided on. Hopefully it will be logical, but the context in which it’s created is different from how it ends up being used.
As a business grows, the desire for more information and better analytics grows. We hire data analysts and pay agencies thousands of dollars to go out, gather this data, and wrangle it into a useful format so that smart business decisions can be made.
It’s too late. You’ve already wasted £1000s a year.
It’s already too late; by this point, you’ve already created hours and hours of extra work for the people who have to analyze your data and thousands will be wasted.
All because no one structured the URLs with data gathering in mind.
How about an example?
Let’s go back to the problem we talked about at the start, but go through the whole story. An e-commerce company goes to an agency and asks them to get total organic sessions to all of their product pages. They want to measure performance over time.
Now this company was very diligent when they made their site. They’d read Moz and hired an SEO agency when they designed their website and so they’d read this piece of advice: products need to sit at the root. (E.g. mysite.com/white-t-shirt.)
Apparently a lot of websites read this piece of advice, because with minimal searching you can find plenty of sites whose product pages that rank do sit at the root: Appleyard Flowers, Game, Tesco Direct.
At one level it makes sense: a product might be in multiple categories (LCD & 42” TVs, for example), so you want to avoid duplicate content. Plus, if you changed the categories, you wouldn’t want to have to redirect all the products.
But from a data gathering point of view, this is awful. Why? There is now no way in Google Analytics to select all the products unless we had the foresight to set up something earlier, like a custom dimension or content grouping. There is nothing that separates the product URLs from any other URL we might have at the root.
How could our hypothetical data analyst get the data at this point?
They might have to crawl all the pages on the site so they can pick them out with an HTML footprint (a particular piece of HTML on a page that identifies the template), or get an internal list from whoever owns the data in the organization. Once they've got all the product URLs, they’ll then have to match this data to the Google Analytics in Excel, probably with a VLOOKUP or, if the data set is too large, a database.
Shoot. This is starting to sound quite expensive.
And of course, if you want to do this analysis regularly, that list will constantly change. The range of products being sold will change. So it will need to be a scheduled scrape or automated report. If we go the scraping route, we could do this, but crawling regularly isn’t possible with Screaming Frog. Now we're either spending regular time on Screaming Frog or paying for a cloud crawler that you can schedule. If we go the other route, we could have a dev build us an internal automated report we can go to once we can get the resource internally.
Wow, now this is really expensive: a couple days' worth of dev time, or a recurring job for your SEO consultant or data analyst each week.
This could’ve been a couple of clicks on a default report.
If we have the foresight to put all the products in a folder called /products/, this entire lengthy process becomes one step:
Load the landing pages report in Google Analytics and filter for URLs beginning with /product/.
Congratulations — you’ve just cut a couple days off your agency fee, saved valuable dev time, or gained the ability to fire your second data analyst because your first is now so damn efficient (sorry, second analysts).
As a data analyst or SEO consultant, you continually bump into these kinds of issues, which suck up time and turn quick tasks into endless chores.
What is unique about a URL?
For most analytics services, it’s the main piece of information you can use to identify the page. Google Analytics, Google Search Console, log files, all of these only have access to the URL most of the time and in some cases that’s all you’ll get — you can never change this.
The vast majority of site analyses requires working with templates and generalizing across groups of similar pages. You need to work with templates and you need to be able to do this by URL.
It’s crucial.
There’s a Jeff Bezos saying that’s appropriate here:
“There are two types of decisions. Type 1 decisions are not reversible, and you have to be very careful making them. Type 2 decisions are like walking through a door — if you don't like the decision, you can always go back.”
Setting URLs is very much a Type 1 decision. As anyone in SEO knows, you really don’t want to be constantly changing URLs; it causes a lot of problems, so when they’re being set up we need to take our time.
How should you set up your URLs?
How do you pick good URL patterns?
First, let’s define a good pattern. A good pattern is something which we can use to easily select a template of URLs, ideally using contains rather than any complicated regex.
This usually means we’re talking about adding folders because they’re easiest to find with just a contains filter, i.e. /products/, /blogs/, etc.
We also want to keep things human-readable when possible, so we need to bear that in mind when choosing our folders.
So where should we add folders to our URLs?
I always ask the following two questions:
- Will I need to group the pages in this template together?
- If a set of pages needs grouping I need to put them in the same folder, so we can identify this by URL.
- Are there crucial sub-groupings for this set of pages? If there are, are they mutually exclusive and how often might they change?
- If there are common groupings I may want to make, then I should consider putting this in the URL, unless those data groupings are liable to change.
Let’s look at a couple examples.
Firstly, back to our product example: let’s suppose we’re setting up product URLs for a fashion e-commerce store.
Will I need to group the products together? Yes, almost certainly. There clearly needs to be a way of grouping in the URL. We should put them in a /product/ folder.
Within in this template, how might I need to group these URLs together? The most plausible grouping for products is the product category. Let’s take a black midi dress.
What about putting "little black dress" or "midi" as a category? Well, are they mutually exclusive? Our dress could fit in the "little black dress" category and the "midi dress" category, so that’s probably not something we should add as a folder in the URL.
What about moving up a level and using "dress" as a category? Now that is far more suitable, if we could reasonably split all our products into:
- Dresses
- Tops
- Skirts
- Trousers
- Jeans
And if we were happy with having jeans and trousers separate then this might indeed be an excellent fit that would allow us to easily measure the performance of each top-level category. These also seem relatively unlikely to change and, as long as we’re happy having this type of hierarchy at the top (as opposed to, say, "season," for example), it makes a lot of sense.
What are some common URL patterns people should use?
Product pages
We’ve banged on about this enough and gone through the example above. Stick your products in a /products/ folder.
Articles
Applying the same rules we talked about to articles and two things jump out. The first is top-level categorization.
For example, adding in the following folders would allow you to easily measure the top-level performance of articles:
- Travel
- Sports
- News
You should, of course, be keeping them all in a /blog/ or /guides/ etc. folder too, because you won’t want to group just by category.
Here’s an example of all 3:
- A bad blog article URL: example.com/this-is-an-article-name/
- A better blog article URL: example.com/blog/this-is-an-article-name/
- An even better blog article URL: example.com/blog/sports/this-is-an-article-name
The second, which obeys all our rules, is author groupings, which may be well-suited for editorial sites with a large number of authors that they want performance stats on.
Location grouping
Many types of websites often have category pages per location. For example:
- Cars for sale in Manchester - /for-sale/vehicles/manchester
- Cars for sale in Birmingham. - /for-sale/vehicles/birmingham
However, there are many different levels of location granularity. For example, here are 4 different URLs, each a more specific location in the one above it (sorry to all our non-UK readers — just run with me here).
- Cars for sale in Suffolk - /for-sale/vehicles/suffolk
- Cars for sale in Ipswich - /for-sale/vehicles/ipswich
- Cars for sale in Ipswich center - /for-sale/vehicles/ipswich-center
- Cars for sale on Lancaster road - /for-sale/vehicles/lancaster-road
Obviously every site will have different levels of location granularity, but a grouping often missing here is providing the level of location granularity in the URL. For example:
- Cars for sale in Suffolk - /for-sale/cars/county/suffolk
- Cars for sale in Ipswich - /for-sale/vehicles/town/ipswich
- Cars for sale in Ipswich center - /for-sale/vehicles/area/ipswich-center
- Cars for sale on Lancaster road - /for-sale/vehicles/street/lancaster-road
This could even just be numbers (although this is less ideal because it breaks our second rule):
- Cars for sale in Suffolk - /for-sale/vehicles/04/suffolk
- Cars for sale in Ipswich - /for-sale/vehicles/03/ipswich
- Cars for sale in Ipswich center - /for-sale/vehicles/02/ipswich-center
- Cars for sale on Lancaster road - /for-sale/vehicles/01/lancaster-road
This makes it very easy to assess and measure the performance of each layer so you can understand if it's necessary, or if perhaps you've aggregated too much.
What other good (or bad) examples of this has the community come across? Let’s hear it!
Great reminder to not neglect URL structure during the early stages of development. Thank you.
Many developers/SEOs stop at "SEO friendly" URLs, but forget about "Analytics friendly" URLs.
One thing you need to change in your article though: "Let's here it!" ....
I love it "Analytics Friendly" URL's that could be the title of this post or a future one that combines SEO and Analytics in terms of URL naming.
Agreed, this is a great reminder to think about the whole picture and how you will be able to measure, report, and further analyze and optimize once the new site is launched. If you're able to more easily spot issues and opportunities, it will likely lead you to better results than simply having a more "simple" URL structure.
Thank you for putting together this post! Many people underestimate how important a well thought out URL structure is—but your post does a great job explaining why it matters to have a strategic URL structure in place.
This is definitely something I will be passing along to my team to ensure we are all on the same page in terms of URL structure!
Thanks again!
This is really interesting Dominic, thank you. Actually, I always had one problem while dealing with a giant ecommerce website, not related to URL but with meta description, i am sure you have a solution for it.
Suppose, if a website have 5 lac or more pages, then how we can make unique meta description for each page ? As the meta should not be duplicate/copied and also we can not invest so much time behind writing unique descriptions for each page, so what sort of things we can do that can save our time and energy both? How can we have unique meta descriptions for each page in less time ?
Will appreciate your response on this, thank you in advance.
Hi Shubham, it's definitely the a common problem.
If you haven't got time to have them written, then you need to create some sort of template to generate them. For example:
Example using {} to represent variables:
{In stock/Out of stock}: {product} available for {price}. {Snippet about shipping}|{read what our customers have to say}
Your snippet about shipping might be product specific something like "This product is offered next day shipping to UK & US" or "This product has free returns".
The snippet {read what our customers have to say} might be the first x characters of a recent customer review.
Hello Dominic,
Thanks for the response. What I have done till yet is, make a template of a meta description "category wise" and replace just the product names and keep rest same (As product names are big, so it covers almost 60 to 70 characters). This still not looks up to the mark to me but there isn't another option you know :(
Your example sounds a bit better than mine, at the end I have to do it manually, hope somebody will make a tool for this, so we can create as many descriptions we need in just a few minutes ;)
BDW, thank you man, keep writing !
Hi Shubham, All major ecommerce scripts like opencart, magento, etc., have meta description generator plugins readily available. I shouldn't post links here to abide by Moz's policy but you can easily Google them. If you use a custom ecommerce script you can code a meta description generator from relevant words in product's title and model and category's title (will come to 160 characters)
Hello ,
Yeah I will give a try to it, thanks for the help mate.
Take care.
As far as huge E Commerce websites are concerned, its best to create common templates and just replace the product name, pricing etc. You cannot come up with a unique description for thousands of pages.
Also there would be something unique about every product, the price, the color it could be anything. However, it will have to be done manually. Until at least some tool comes up which could actually create unique descriptions.
Yes, i have mentioned this in my second comment that I am using a same template for all product pages, just replacing the product name price etc. So, ultimately it becomes a unique description. Still, it takes so much time but we don't another option so we have to do it manually.
BDW, thanks for sharing your opinion mate. Take care.
Very helpful post - cheers! Loved the fact that you closed off with some practical tips in : common URL patterns
Hi,
This is really interesting topic, thank you. Url structure is one of the most important part of the SEO purpose. Really this is one of the best topic for the new users.
Good post Dominic :)
This is something I'm literally dealing with right now!
One way I'm trying to solve the problem is with regex, but I'm very new to it.
One rule I'm trying to use is to include URLs with only one forward slash - i.e. /weed-killer-pro or /lawn-compost etc (as product URLs) - whereas nearly all other URLs have multiple forward slashes - /lawn-care/composts (category URLs)
Maybe a mozzer can help here, as I'm struggling to work it out!
:)
Dan
Hi Dan, this will need a little playing around with if you have other special characters in URLs, but this should be enough to get you started!
https://regex101.com/r/hHVrnU/1
Dominic, so let's say I'm working with an E-commerce Furniture store. How would I setup the URL Structure, because you did mention that products should at the root but then discussed grouping patterns.
So if I have a specific type of table should I have it exist like this: website.com/end-table or website.com/living-room/end-table
Let me know what your recommendation would be and why you think?
Thanks!
This is a great post - Thanks for this! Had a nightmare where a large blog had to be migrated and had no "blog" url identifier, when a new site was needed - content migration was a nightmare. It had to be a manual job of identifying if pages were products or blogs. We were lucky that there were only 1500 URLs but having no identifier made a new site launch a nightmare and a massive job. Consistency is needed if you have multiple blog/copy uploaders as it was clear that several people had worked on the site with out knowledge of what the previous person did. So Url structure is so important to carry forward. When you work agency side this time was definitely not factored into the cost of the new build... stressing importance of a "content audit" stage.
Dom - Do you have any recommendations on the depth of URLs (IA) for ecom? many say 3 is optimal but then is numerical categorisation considered one?
Keen to know your thoughts,
Michelle
This is especially important for local businesses who have very little to no branded searches happening for them. Great information on properly siloing URLs for both the user and search engine, and I totally agree that a lot of people don't treat URL creation like a Type 1 Decision, when they rightfully should, as you don't want 1500 or so 301s on your site. Very well covered, and wether a business is a online clothing retailer or local construction company, this is vital info.
Like a comment i posted on another site, on this subject, earlier in march.
There are so many things that become easy with a nice directory structure.
A few examples:
* Analysing topic/section performance in Google Analytics (like this post explains so well)
* Crawling/filtering with tools like Screaming frog
* PPC targeting specific topics/sections of the site. (Remarketing / Dynamic Search Ads etc)
* Robots.txt stuff (exclude all pages of a type in one line. This is impossible without said structure)
I'm glad this seems to be gaining ground.
It never really didn't make alot of sense, mis-mashing everything in the root of the domain.
Thanks for this article. It does bring up a question for me, as this article looks at and around the subject of existing URL structures and product category URL paths, but at no point do you say "now may be the time to restructure your site's URLs or hierarchy structure". Yes, when starting an eCommerce website one may look to best practices - but for an eCommerce site a little longer in the tooth which was not set up as efficiently or as optimised as 'recommended', is it a definite no-go to restructure the product and sub-category URL paths to be better optimised for data analysis?
"Setting URLs is very much a Type 1 decision. As anyone in SEO knows, you really don’t want to be constantly changing URLs; it causes a lot of problems, so when they’re being set up we need to take our time." - does this mean that if your site is indexed and the URL structure has been determined, live with it - as Type 1 decisions are not reversible.
Thanks for the post. Here's a case-in-point: we have a site dealing with books and have historically kept the book titles right after the root (e.g. .../1984). After reading this, I plan to switch to .../book/1984, which also helps us distinguish from our /author/... pages. We've been doing everything custom in Google Analytics up to this point, which has been exhausting.
Really helpful post to any SEO expert. Thanks for sharing.
I appreciate the URL structuring strategy tips. This is definitely something that we will need to evaluate.
Hello Dominic Very nice and Informative article you are right Products pages structure should be made for the humans and should have clear navigation. Dynamically made pages structures like www.abc.com/food/123 only confuse users. I would like to ask that https://www.exportersindia.com/indian-suppliers/fresh-cut-flowers.htm navigation given in this page is correct or should I change it for the better performance. My website is still performing well
In some cases you could sacrifice structure for better positions in Serps and use dimensions from Google Analytics to extract the info.
Your writing is really helpful to any Website Designer or to any SEO Experts because Page URL is a vital point for having good rank. So we should always to check this point before starting a SEO Services project. Thanks for reminder!
S.Das
This is really interesting article . Url structure is one of the most essential part of the SEO, while you are working on eCommerce website . As we have to collect data as well from it.
Thanks for sharing..
Interesting topic, and very helpful blog. Will definitely follow your advice!
Really good article. In most cases we don't dedicate enough time to think about the urls category and when we realise a lot of work is done and it cost a fortune to change it.
We will follow your advise.
Thanks for sharing
Thank you for exprience, structuring is very important for SEO but I thinks the backlink is also important, could you help me how to do in Moz backlink create.
Great Thanks
Dinh Van Tung
Good post Dominic !! I will try to put your tips in practice on my website. Always learn new things with you, thank you for sharing your knowledge.
Thank you for this, structuring a URL is a important part of SEO and getting it right is what counts.
Thanks Dominic. Your coverage of this topic is good and it's a hugely important one. Personally I've found challenges in this area - it often seems obvious and easy at first, but the big challenges are thinking out a url structure that's going to work for the long term.
This was a home run post Dominic! I spend a lot of time wire framing (maybe too much time :D) to make sure I have covered all the base for that ideal silo structure. I'll definitely be referring back to your post for guidance. Thanks!
Regarding the organization of the folders in a url, it is logical that at the beginning, when we started with the web project we made mistakes. We find the right time to upload all our products by ecommerse in the shortest time possible to sell and simply look for a coherent route www.web / word-word-word-word. In my case the study of keywords came later and I realized with my toy store, it was a good idea to add in the url folder the name of the toy brand, basically because the keyword had more searches and was more specific.
Nice stuff Dominic. As SEO, an ideal URL should not be only user friendly but also analytics friendly. Measuring is crucial!
Excellent post I want to thank you for this informative read; I really appreciate sharing this great post. Keep up your work. An amazing article it’s nice to read a quality blog post. I think you made some good points in this post these simple tips are really simple. I have used all these tips in seo Auckland and I am surprised that these all works fine. You are a great advisor. Thanks for advising these simple tools.
Surprised.... thank you so much for sharing this post and give me something new......
Congrats on making me change my game up and my approach is normally always SEO focused with the main pages as close to the root with some keyword attention in there, but as I see that ruins some awesome data fruit. It is funny too due to all the different algo changes on various search engines and even what clients want you need to have data to back up marketing reasoning.
I recently re-dev'd a site and noticed that the first dev did a wonderful job with the urls basically telling a small story of what page you were at in the site and it made sense no matter how many levels down the page was on the url. I guess from here the biggest point is to have a seo friendly url that can also aid in data collection.
Thanks for this contribution.