Happening now! Exclusive AMA: Streamlining Fulfillment and Delivery with Shopify Experts | Ask your questions to be answered by our team!

How to add noindex to Shopify’s recommended product URLs

How to add noindex to Shopify’s recommended product URLs

AlphaOmega
Tourist
7 0 3

How to add noindex to Shopify’s recommended product URLs

I want to resolve Shopify’s “You may also like” duplication URL issue. It’s my understanding that this issue is inherent to Shopify’s filtering system, and the way it tracks “recommended product” clicks that is at the bottom of each product page. But these analytics cause a big SEO problem! Each related product link is not using the canonical link. They are using a link with heaps of parameters on the end. For example for every product I have I end up with about 30 additional URLS. Each of the additional URL looks something like this starting with a "?" after the original product URL, for example “?pr_prod_strat=e5_desc&pr_rec_id=591940bca&pr_rec_pid=7792860823794&pr_ref_pid=7792853975282&pr_seq=uniform”

  1. Indexed (I don’t want the additional URLs indexed - they are duplicates)
  2. Alternate page with proper canonical tag (takes up crawl budget)
  3. Crawled - currently not indexed (takes up crawl budget)

I want a solution to correct this issue.

Some suggest adding the following to my robots.txt

{%- if group.user_agent.value == '*' -%}

  {{ 'Disallow: /*?pr_prod*' }}

  {{ 'Disallow: /*?filter*' }}

{%- endif -%}

The problem with this solution is that it doesn’t resolve all of the 1000s of URLs already in my GSC and overall Google says it recommends a noindex solution and not a robots.txt to hide webpages.

Another solution which I think is a better solution from what I read on Google is to add a noindex rule for these duplicate URLS. Is it possible to add a noindex rule for these duplicate URLs?

 

Thanks for your support

Reply 1 (1)
AlphaOmega
Tourist
7 0 3

Thanks for the feedback. How would the conditional noindex be written so that it only adds the noindex to the product recommendation urls which is added the root product url starting with a "?".... Thanks I could see if this wasn't written correctly that I could accidentally noindex more urls than desired.