Hello all,
I would like to remove the crawl and indexing of my tagged collections because it creates duplicate content between “clean” collections without tags and tagged collections with parameters. In fact, the filter change nothing, it just rearranges the collection according to the product tags.
Despite the sitemap sent to google, the canonical tags to the right URLs, Google is indexing certain collections with a tag parameter (when you click on a tag to filter the collection). That’s how Shopify works, I can’t change it, the canonical URL of a tagged collection (for example site/collections/collection-name/tag1) is
site/collections/collection-name/tag1
and not
site/collections/collection-name
as I would like.
The tag parameter looks like this, it’s
?constraint=tag1
First solution I found :
I was thinking to add a remove filter to my canonical tag in my theme.liquid
this
<link rel="canonical" href="{{ canonical_url }}">
to this
<link rel="canonical" href="{{ canonical_url | remove:"?constraint=" }}">
Second solution i found :
There is also Google URLs parameters
https://www.google.com/webmasters/tools/crawl-url-parameters
I think it would work, no ? I just have to put the ?constraint= and Googlebot will not crawl and index the URLs with ?constraint= in it
Third solution I found :
there is also this old thing
{% if template contains 'collection' and current_tags %} <meta name="robots" content="noindex" />
thank you for your help, i really need it

