I'm seeing the following;
My question is, as our products only belong to one collection, is there a way to make the Product shown in the collection page link directly through the Collection page?
i.e. It looks the same however the products displayed link to - .com/products/product-name rather than .com/collections/collection-name/products/product-name
The reason I ask is that from an SEO point of view the internal linking from the collections pages point to the /collections/ URL which is then canonically redirected to /products/ which adds time to crawling the site as well as loses link equity through the redirect.
Solved! Go to the solution
Replace the product.url in your collections template or other templates where collection product links are used.
{{ product.url | within: collection }}
and replace with
{{ product.url }}
for example:
Cheers,
Tejas
Success.
Hello Aviannah:
This is a great question. Unfortunately, it's not something that is able to be changed. Only handles are able to be adjusted. So you could change what the URL displays the product name to be, but the Shopify generated URLs will stay the same.
Basically, the URL is like breadcrumb navigation. Whatever the route that it takes to get to a product will be shown in the URL. So, in this case, the product was in the collection so it will show /collection/collection-name/products/product-name.
i hope that helped to clarify for you :)
Thank You @Tejas_Nadpara
This was very useful as I am having the same issue.
It would be in "product-card-grid.liquid" file.
Thank you,
Tejas
Subject | Author | Posted |
---|---|---|
2m ago | ||
5m ago | ||
6m ago | ||
19m ago | ||
24m ago |
User | Count |
---|---|
325 | |
77 | |
72 | |
65 | |
56 |