How can I change my shopify url Structure

Replies 31 (31)
New Member
2 0 1

Thanks! Worked for me over at Awake Happy.

5 0 1

Thanks @beardfactor - the Paul Rogers advice worked perfectly 

4 0 0

how is the work around to handle /collections/  ?

New Member
1 0 0

HI All

Is there an answer on how to update the entire URL structure and not just a single product URL?


Shopify Partner
31 0 8

Hi, Shopify experts. I'd like to hear your advice.

We have a store with less than 5 products. We want short URLs for products like
We think we can pull it through with this technique:
1. Create a product. Default URL would be
2. In Shopify admin set up redirect ->
3. In product pages template add JavaScript
/* Pretty URL manipulation */
function makeProductUrlPretty() {
let product_handle = window.location.href.split('/').pop();
let pretty_url_for_product = window.location.protocol + "//" + + '/' + product_handle;

Same concept can be applied to blog articles and pages.

Downsides I see:
– Necessity to manually set up redirects for every product/article/page
– If the product has variants, it can be troublesome to manage the ?variant=123456789 parameter to be handled correctly with this short URL

Is there any reason to think Google could penalize us for this? Which could be the arguments why it's good or bad for SEO?
Any thoughts are welcome.

4 0 2

I wouldnt use this for products, but for blogs. I have seen Shopify shops with blog URL structures like the following:

This looks extremely silly and is a surefire way to prevent real people from remembering the real URL of a blog article. Was it Or was it blogs/blog?

Furthermore, for some Shopify pages results in a 404. Sure, you can set up redirects, but those all have to be set up.


Ideally Shopify would offer the option to use URLs that are made with humans in mind:

It is hard to believe that something that is so obviously useful and at the same time so very basic is not possible unless you go with a headless Shopify shop.


Shopify Partner
2 0 0

Any luck on this?

4 0 2

No luck whatsoever. I think going headless is the only solution.

Shopify Expert
86 0 46

As a long term Shopify expert I'd say this is up there on one of the most annoying things about Shopify which has never been addressed. 

There's a bunch of use cases for needing to modify the core url structure. Migrations and not wishing to lose SEO positions  / languages being main 2.


There's a few mixed threads going on here. So I'll clarify as things stand and will stand for a long time.

having all product urls without the collection path in them is easy but may present some issues with related products.

e.g. you can have all links going to
and not

that takes 5 mins in the theme and is a doddle for any Shopify developer.

what you can't do is for example if you're a German store is:


or if portuguese


or if you sell bling


you can't do that natively on Shopify and don't hold your breath for that one.  Been asking for it for ever.

You can do it by going headless but this is not at all sensible in most cases (cost being main factor - it's prohibitively expensive for most merchants to build and maintain). This is the only option for modifying the core URL structure.


You can also have custom urls without using headless by using app proxies to render any non system url. But again - this would involve a lot of cost / dev time time and your canonicals would always be /products or /collections etc so it wouldn't be suitable in most contexts. The core structure would remain the same but you could have some aesthetic urls. We're doing this right now but for rendering some content which just doesn't fit /pages or /posts etc.

so for example you could create a url like this
but the canonical would be

so yeah, there's a couple of options if you have budget / time
but they don't suit most cases where people simply want to change /products/ or /pages/ etc and move on with life
that ain't happening 😥

★★★ Need help setting up your Shopify store? Hire me here: ★★
New Member
1 0 0

Yes, I need this for my website too, but specifically for the blog part. I migrated my website and now all my article URLs are broken. They all have SEO juice flowing through them and they now stopped. I don't want to add over 100 redirects when this should just be a feature.

New Member
1 0 0

Hello Everyone, 
I got the solution.
I found this article which is very useful. 
if you have this type of link 
and want to convert this link to this one...

Suggestion: if you didn't find the file name: product-grid-item.liquid
then try to find other files related to this name, and try to find this code "{{ product.url | within: collection }}"

Shopify Partner
1 0 0

@Pratik30 I'm not able to locate the code "{{ product.url | within: collection }}" anywhere in my shopify store. Can you help?