But let me explain why, the best workaround, and your options if you're very determined.
Shopify's default URL structure
Let's start with the native Shopify URL structure and its limitations.
Out of the box, your product URLs will be a subdirectory under your collection (category) pages.
If you have a product with the handle <code>fluffy-pink-socks</code> and a collection with the handle <code>socks</code>, then you'd have:<br/><code>/collections/socks/products/fluffy-pink-socks</code>
Or at least it'd appear that way, a closer inspection shows the real URLs are:<br/><code>/products/fluffy-pink-socks</code>
Unfortunately, Shopify opt to use the longer version by default to allow breadcrumb functionality. This however can be fixed with a simple code edit.
Start in your Shopify dashboard by going to Online Store > Themes > Customize > Theme Actions > Edit Code > Snippets > <code>product-grid-item.liquid</code>:
Then remove the text that says “within: collection”:
Hit Save and all your links should be fixed. Just be careful to remove all instances, sometimes your theme may have multiple links or have a slightly different structure.
With that 5 minute fix, your product URLs will be in a more typical format for eCommerce. I'd highly recommend doing this.
The problematic part is collection pages i.e. product categories.
Collection pages have 2 major URL issues:
- They require <code>/collections/</code> to be included in the URL
- They don't allow sub-directories e.g. <code>/chairs/office/leather</code>
This also comes down to how Shopify is built, there's no admin functionality to set a parent or child collection to even begin building this type of URL structure.
The solution in most cases is to switch from a subdirectory structure to a flat URL structure e.g. <code>/chairs/office/leather</code> would become <code>/leather-office-chairs</code>.
As for <code>/collections/</code>, there is no way to remove this from the URL.
Blog Pages / Posts
Many blogs on Shopify have a weird URL structure, especially if they name their blog "blog".
This leads to the following blog URL:<br/><code>example.com/blogs/blog</code>
Then blog posts will be under:<br/><code>example.com/blogs/blog/my-example-post</code>
This is fairly ugly but also weird to migrate to from another platform.
The thing to understand here is Shopify's built in blogging platform. It's built to enable multiple blogs, for example you could have:
All under a single website, acting almost as categories on a traditional blog. The only downside to this is navigating to them as you'll need to open the full URL, opening <code>/blogs/</code> to find a list of all doesn't work.
My suggestion is to think carefully about what blogs you will create and how that will reflect in the URL structure.
Most Shopify stores opt for "news" to keep this simple i.e. <code>/blogs/news</code> and <code>/blogs/news/new-post</code>.
Again, there's no customisation available here besides the handle of the blog i.e. <code>news</code> in the above example.
For other pages, you'll find them under <code>/pages/name-of-page</code>.
Once again, there's no ability to customise this i.e. remove <code>/pages/</code>. But also, it's not such a bad thing.
Why this can be bad for SEO
If we were to make some blanket SEO recommendations for eCommerce URLs it'd be:
- Keep URLs as short as possible
- Include the main keyword
- Use a user-friendly directory structure
- Don't repeat words
For the most part Shopify can tick all of these with some conscious effort, besides a proper directory structure.
While it's possible to create a collection under <code>/collections/leather-office-chairs</code>, if we also have a number of other office chair materials, and a number of other chair types, it makes sense to have all these organised.
- <code>/chairs/</code> - List of all chairs / types
- <code>/chairs/office/</code> - List of all office chairs with filters to narrow down
- <code>/chairs/office/leather</code> - List of all leather office chairs
For SEO purposes, each of these would be customised to rank as they likely all have search volume.
It's also extremely easy to understand the relationship between these pages. Leather is the child of office i.e. a subcategory, and office is the child of chairs.
Does it matter?
Not particularly. You'll just have to do the best with what you can, that means:
- Include the full depth / keyword in the URL e.g. <code>/leather-office-chairs</code>
- Create each of these as separate collections
- Use Shopify product tags or similar to set the products in these collections
The only really annoying thing is these won't be integrated into the faceted navigation (by default), so you'll need to manually link to these from menus and collection descriptions.
How to change your Shopify stores URL structure
If you're determined to change the URL structure of your store though, what are your options?
- Use product tags
- Add custom functionality to standard pages
For the record, I wouldn't recommend neither of these options as it adds too much complexity for little benefit, but they're both real world fixes I've seen applied. So I'll explain anyway.
Use product tags
If you're only after one additional directory/folder and willing to do some custom development, one option is product tags.
Product tag URLs look like this:
This isn't ideal as it's only one additional folder, ideally you would want <code>/mens/t-shirts/black</code>, but you could say it's better than nothing..
There is a major problem though:
Without custom development and in my opinion, more complexity than it's worth, there's no way to customise these tag pages for users nor search engines.
Some stores do use this though, Horizn Studios for example:
This is a product tag page that acts exactly as a collection page. It works because their store has limited products and functionality, but again, I wouldn't suggest it in most cases.
Add custom functionality to standard pages
I'm not sure why you'd want to do this except in rare cases, but it is possible to develop some custom solutions within the standard constraints of Shopify.
But you're still limited to the default URL structures explained above.
Emulsion, for example, use a page instead of collection for their products:
They also use a URL variable to change category:
I'm not entirely sure why they do this and wouldn't recommend doing the same, but it is an option.
Another interesting example is iSmash:
Click "Book Repair" and you'll be taken through a step-by-step process to book your repair. No product pages used at all.
Again, probably unnecessary or outright pointless for most stores, but if you're really determined, a developer can help to some degree.
Tips for migrating from another platform
If you're migrating from another platform, you have a massive project ahead of you. My best advice would be to hire an SEO agency or consultant to assist you.
If that's not an option, here is what you should consider:
Inevitably you'll need to change URLs.
Maybe your products are currently accessible under the root domain e.g. /product-name/ or your platform uses a different folder for categories e.g. WooCommerce uses <code>/product-category/</code>. You may even have query URLs like <code>/?material=cotton</code>.
While changing URLs is discouraged if possible, it's a necessary downside of changing platforms. And if done right, most likely won't lead to any loss of traffic.
The first thing you should do is crawl your entire website with a tool like Screaming Frog or SiteBulb, get a list of all pages on your website, then plan and create the replacements on Shopify.
These will usually be separate collections in Shopify, so rather than <code>/chairs/gaming/leather</code> it would be one collection for chairs, another for gaming chairs, and another for leather chairs.
Redirect old URL structures
Once all the replacement pages are made, you'll need to create redirects in the Shopify Redirects section from the old structure to the new one.
This will ensure users visiting the old structure will be redirected to the correct page, along with search engines.
You should do this inside of a spreadsheet, then simply import all the redirects - saves time.
Deleting or Removing old pages
If you plan to delete some pages, just redirect them to the most similar page.
Or if there isn't an equivalent filter, for example, if your page is <code>/bed/sheets?material=cotton</code> (as a filter), you could either create a collection named <code>/collections/cotton-bed-sheets</code> or redirect them directly to the <code>bed-sheets</code> collection.
There's a bit of nuance here to figure out the best way of doing things, but the simplified version is to redirect to the same or most relevant replacement page.
Frequently Asked Questions
Here's a few questions that come up commonly about Shopify URLs.
Can you remove /collections/ from category pages?
No. I mean, it's possible to change this function to <code>/pages/</code> instead (as above), but it doesn't make sense to do so. Nor can this be removed from URLs.
Can you remove /products/ from product pages?
Unfortunately this is not possible also.
Can you use sub-directories / sub-folders for international stores?
Kinda. Usually we'd recommend setting up unique stores under subdomains (e.g. <code>fr.example.com</code>), but it's possible to do this at least for languages. Using an app like Langshop, it's possible to setup sub-directories such as <code>/fr/</code> for French language.
This is for languages though, not international stores, you may want to have separate US and UK stores for example, where this wouldn't make sense.
What’s the best approach for international store URLs?
The best approach is either subdomains (e.g. <code>uk.example.com</code>) or top-level domains (e.g. <code>example.fr</code>). This can then be configured with Hreflang tags for SEO.
At the end of the day, the answer to whether you can change the Shopify URL structure is still "not really". But hopefully this provides some explanations and advice for making the most of how it works.
Further Shopify Reading
For more advice on increasing traffic to your Shopify store, check out these articles: