How to prevent indexing of duplicate URLs with ?variant= in Google Shopping?

We have a problem with URLs created in google shopping like:
https://bestbrilliance.com/products/the-luna-engagement-ring-2-5-carat-14k-white-gold?variant=39698097995843
That is indexed in google - pic attached,
This causes a problem with many URLs created and affecting google crawl budget - we have almost 4K duplicate urls as an error in google console - another pic attached.
We know these pages have canonical tags but google search engine still scan and sometimes index them - which again affects crawl budget unnecessarily.
We talked with our developer and he says he doesn’t have access to this part of the code.
We tried to block these urls with robots.txt and that stopped google shopping from working at all.
This kind of problem happens in a couple of our shopify accounts.
Have any idea how to solve this or block this pages from getting indexed?

The first question you need to ask yourself.

Do you want to list all variants to Google Shopping?

If no, then I recommend using an app such as: https://apps.shopify.com/multiple-google-shopping-feeds

Which allows you to exclude all variants.

If you do want to list all variants, and you have added the correct canonical URL, then I would not worry about Google crawling your site. Having all your variants in organic listings is a positive thing, rather then a negative.

How is it a positive thing to have same page indexed 10 times on Google, its duplicate content x 10.

/prod-name

/prod-name?variant-123

/prod-name?varian-1234

and so on…

For Google shopping it may not be a big deal, but for SEO it is…

1 Like

You might be interested in: https://support.google.com/merchants/answer/9340054?

1 Like

The problem is even with canonical the page URL with variant get indexed - and that is wrong it’s like duplicate content in google and we want to prevent it! Not good for SEO in any way… Thanks for the app offer we’ll try it

Did you find a solution to this? We are facing the same issue..

You can exclude variants by unpublishing products in the app, if you are using Google and Youtube, or use the app I suggested above.

Im meeting the same problem. Anyone got the problem solved?

This worked for me. Add this canonical script in theme.liquid.

Replace with:

{% if template == ‘product’ %}

{% else %} {% endif %}