Hi everyone, i have an issue with duplicate content on a website i’m managing.
Shopify is creating duplicate versions of each product on different URLs. For example:
https://www.artisandelimarket.co.uk/products/the-banquet-hamper
can also be found on:
https://www.artisandelimarket.co.uk/collections/cheese-wine-hampers/products/the-banquet-hamper
The second URL canonicalises to the first URL, which is good. However, all links to products on collection pages point to the second (canonicalised) version which is bad. For example on:
https://www.artisandelimarket.co.uk/collections/hampers
the only link to the Banquet Hamper is https://www.artisandelimarket.co.uk/collections/cheese-wine-hampers/products/the-banquet-hamper, when i actually want it to link to https://www.artisandelimarket.co.uk/products/the-banquet-hamper
I’ve looked at guides online, and they say to open Shopify admin panel > Sales channels > Online store > Themes > Actions > Edit code > Navigate to the “Snippets” folder and find the “product-grid-item.liquid” file > Locate the following line of code:
<a href=”{{ product.url | within: collection }}” class=”product-grid-item”>
and change it to
<a href=”{{ product.url }}” class=”product-grid-item”>
HOWEVER, i can’t find the “product-grid-item.liquid” file, and i’ve searched for it by exact name in the code base. The site runs on the Dawn v1.1 theme. Could someone please confirm whether the fix i’ve outlined above will work for this site? If so, could you please point me to the correct folder, page and line of code so i can make the change? If not, i’d appreciate an alternate, efficient solution.
Thank you!