Noindexing parameter/variant pages

2 0 1



I am new to shopify. I need to noindex variant pages of products, but I can't find anything after looking it up. I have products that have no variants but still have variant URLs which I need to somehow noindex and remove canonical tags from

An example page is this
Original Page -

Variant Page -

It's literally the same product but it's both showing up in google causing duplicate content.

Replies 6 (6)
3 0 1

Dear Support.


We have the same issue. Not only with variants.

The Googlebot and other bots crawls and index ugly pages (yes, we have canonical). But it should noindex.


It's a waste of crawl budget, ugly URLs and duplicate content.


Normally, I would stop crawling with robots.txt for parameters.

Disallow: *?


But if indexed and crawled, it's only for the future. We can't remove it: It's blocked now (to prevent further requests).

I have seen here some hints, which I have tried with the theme.liquid.



{% if handle contains 'seq=uniform' %}
<meta name="robots" content="noindex">
{% endif %}


from here:


But it seems, is has no influence inside the source code. It's index, follow furthermore.

Any idea? Many other people have the same issue.



I would add not nofollow. The crawler will break the crawling of other pages from here, and you have a lesser chance to remove the other bad URLs. Nofollow stop further crawling at this point. 


Noindex is fine.

Due noindex, it’s also a crawling budget invest for the future. It's reduced the attempts in the future





3 0 1


I've fixed the issue above for my website using JavaScript

Use this code below:

document.addEventListener('DOMContentLoaded', function() {
if (window.location.href.indexOf('?') > -1) {
var metaNoIndex = document.createElement('meta'); = 'robots';
metaNoIndex.content = 'noindex';

hope this helps!

1 0 0

Hi Destman,


Where did you place this script? I've got the same issue, thousands of urls creatred from /search parameter, index, follow, so blocking is not an option until they are no index. Do you think it will work for me?

Shopify Partner
22 0 11

You must add the code in theme.liquid inside head tag.

Shopify Partner
22 0 11

Hi @DestMan and thanks!!

It works for me!!

1 0 1

Add the following codes at the end of your theme.liquid file. And then monitor your search console indexing results.


{%- if canonical_url="*?variant=*" -%}
<meta name="robots" content="noindex, nofollow">
{%- endif -%}


What's more, you can add Disallow: /*?variant=* on Robots testing tool, and test whether it can be indexed or not. Being blocked is the result you want.