How to shorten the product path

Hoangkhang
Tourist
3 0 1

Hi, I know this is probably a topic that has been asked many times. But I really couldn't find the most accurate answer for my case. Hope everyone please help me because this is my first time working on Shopify.

My current collection path looks like this: /collections/collection-name/ or my current product path looks like this: /collections/collection-name/products/product-name.

So I am looking to change the collection path to: domain/collection-name and product path to domain/collection-name/product-name

I have looked at answers from previous people who say change {{ product.url | within: collection }} to {{ product.url }} in collections template. But it doesn't seem to be the problem I was having.

Here is some information of my website, I am currently using the debut theme, whose domain name is: https://www.mualobster.com/.

If I have breached or broken any of these terms, notify me so I can correct it, I need you!

I look forward to your guidance, thank you!!

0 Likes
JHKCreate
Shopify Partner
2052 334 448

Hi @Hoangkhang ,

The URL structure cannot be changed on Shopify here as it is standardized across all the platform, so there really isn't a solution to solve this unless you create redirects. 

 

- Did we solve your issue? Like & Mark As Solution to help the community
- Should you need any direct help: contact@jhkcreate.com
Dirk
Shopify Staff
Shopify Staff
760 83 175

Hey, @Hoangkhang 

At this time, Shopify's URL structure is hardcoded in place. This means that you cannot change the verbiage of the structure or completely remove file paths such as /collections or /products. However, you can change the product-name or collection-name aspect of the URL by going to 'Edit Website SEO' at the bottom of the product or collection that you are editing from the admin.

If there is anything else I can help you with, please let me know.

 

Dirk | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Hoangkhang
Tourist
3 0 1

Thanks for telling me this, this is great news for me!   

JHKCreate
Shopify Partner
2052 334 448

Sure thing! 

You can use this app to help you get the URLs you want to redirect to the original pages that way you can use different links: Easy Redirects by ESC – Ecommerce Plugins for Online Stores – Shopify App Store

- Did we solve your issue? Like & Mark As Solution to help the community
- Should you need any direct help: contact@jhkcreate.com
Hoangkhang
Tourist
3 0 1

Hi, @Dirk 

First of all, thank you for a particular reply, and I understood what you mean and Shopify's rules.

If Shopify's URL structure is hard-coded in place, can you help me with this problem?

In the above question, I have mentioned the issue "I have looked at answers from previous people who say change {{product.url | within: collection}} to {{product.url}} in collections template. But it doesn't seem to be the problem I was having. "

As I understand it, this can help me shorten the product's path (not through the collection path), but in the theme's source code, I can't find it. 

Most of the tutorials found it in the "product-grid-item .liquid" file, but it seems that with the debut theme it didn't or I didn't find it. Can you assist me to delete the collection path?

0 Likes