Ad

In Shopify "Product Page" Is Indexed With Collection URL , Why?

My product page (Shopify) URL is abc.com/product/blue-shirt/ and it is in the "Shirt" collection. I have an issue about indexing, Like; Google indexing both URLs abc.com/product/blue-shirt/ | abc.com/collections/shirt/product/blue-shirt/.

I don't know why, because I have submitted a sitemap with this format abc.com/product/blue-shirt/, Som other URLs shouldn't be indexed.

Hope you understand my point.

Thanks.

Ad

Answer

Replace the product.url in your collections template or other templates where collection product links are used. You just need to remove "within: collection".

{{ product.url | within: collection }}

and replace with

{{ product.url }}
Ad
source: stackoverflow.com
Ad