-1

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.

  • I’m voting to close this question because GENERAL SEO QUESTIONS ARE OFF-TOPIC. Only programming-related SEO questions are acceptable on Stack Overflow. Non-programming SEO questions should be asked on Webmasters.SE at https://webmasters.stackexchange.com. If someone has directed you here to read this warning, go back and delete your question. – Rob Mar 31 '21 at 10:26

2 Answers2

0

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 }}
DVS
  • 326
  • 1
  • 7
  • Thanks, But I already remove the "collection" from the product URL. That's why I'm confused about it, that why google indexing it with the collection name, even it does not exist. – Basit Sheikh Mar 31 '21 at 09:21
  • If you already changed it, then you need to wait for the some days. Because google will take some time to update it. I think it will be updated after some days. – DVS Mar 31 '21 at 09:26
0

Yes, I think those indexed URLs are now removing from Google. By removing "within: collection" from code, google won't index it.