SEO, AdWords, affiliates, advertising, and promotions
Hello,
{% if handle contains '?variant' %} <meta name="robots" content="noindex"> {% endif %}
Hi @Maxime07
I dont think you can use the `handle` parameter to detect a variant.
In any case, you have the following `canonical` tag
<link rel="canonical" href="https://www.myamericanshop.com/products/yankee-candle-tree-farm-festival-petite-jarre">
Canonical is telling google to show only the product page instead of the variant page. I don't think you need to have any custom robots tag.
Hello @Maxime07,
It's flareAI - your Fully Automated Free Sales Machine here. We are helping Shopify merchants provide solutions for the last few years in Shopify Community.
If helpful, please consider Like and Accept solution.
You can correctly set the canonical URL for the variants. The canonical URL element informs Google and other search engines to crawl a website, and what URL to index that specific page’s content under. You can read this blog on canonical URLs
$10+ billion in eCommerce on Google Search every day. Sadly, for only 4% of the stores. Find out instantly how much of your Shopify store is missing from customer searches on Google https://flareai.co/FOG.
If you found the answer helpful consider supporting the Shopify Community by giving it a Like + Accept the solution.
Gina
flareAI
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025