Skip to content
Store slow, dated, or hard to edit? Request a Store Diagnostic
Running B2B on spreadsheets or email? Plan Your B2B Project
SEO

Shopify Canonical Tags on Variant URLs: Why Google Sometimes Ignores Them

You check Google Search Console and there it is: yourstore.com/products/classic-tee?variant=41234567891 sitting in the index, sometimes even ranking, instead of the clean yourstore.com/products/classic-tee URL you expected. You didn’t set this up. Shopify is supposed to handle canonicalisation automatically. So why is Google showing the “wrong” URL?

This is one of the more confusing technical SEO issues on Shopify because the platform genuinely does the right thing by default, it renders a rel="canonical" tag pointing at the base product URL on every variant page. The confusion comes from a widely misunderstood fact: a canonical tag is a signal Google considers, not an instruction it obeys. When other signals point a different way, Google can and does choose the variant URL instead.

This post explains exactly what Shopify does with canonical tags on variant URLs, why Google sometimes overrides that signal anyway, and how to check, and fix, which URL Google has actually chosen for your product.

How Shopify Handles Canonical Tags on Variant URLs

Every Shopify theme built on the standard theme.liquid layout outputs a canonical tag using Shopify’s canonical_url object, generally rendered as <link rel="canonical" href="{{ canonical_url }}"> inside the <head>. For product pages, this object resolves to the clean product URL, /products/classic-tee, regardless of whether the page was loaded with a ?variant=41234567891 query string appended.

This is genuinely useful default behaviour. When a shopper selects a colour or size from a variant picker, many Shopify themes update the URL in the browser’s address bar to include the variant ID (partly for shareable “deep links” to a specific variant, partly to support browser back/forward behaviour). Without a canonical tag, every one of those variant URLs would be a separate, near-identical page competing for the same search intent as the base product, classic duplicate content territory. Shopify’s default canonical tag prevents that by explicitly telling search engines “this variant URL and the base URL are the same page; treat the base URL as authoritative.”

A few things worth knowing about how this actually renders:

  • The canonical tag is present on every variant URL of a given product, always pointing back to the same base URL, not to each other.
  • This happens automatically in Online Store 2.0 themes and most legacy themes, you don’t need an app for basic variant canonicalisation to exist.
  • The canonical tag only controls the URL Shopify tells search engines is correct. It does not control internal linking, sitemap inclusion, or where ads and other channels send traffic, and that gap is exactly where things go wrong.

Canonical Tags Are a Hint, Not a Directive

This is the part of the story most “fix your canonicals” advice glosses over. Google has been explicit in its own documentation that rel="canonical" is a signal, not a command. Google decides on what it calls the “Google-selected canonical” for a set of duplicate or near-duplicate pages, and while your declared canonical tag is one of the strongest signals it uses, it’s weighed against other evidence, and can be overridden.

In practice, this means a correctly implemented Shopify canonical tag doesn’t guarantee the variant URL will be ignored. It significantly improves the odds, but it isn’t a switch you can flip and forget.

Why Google Might Choose a Variant URL Anyway

There are a handful of recurring, Shopify-specific reasons a variant URL beats the canonical signal.

1. Internal links pointing straight at the variant URL

This is the most common cause. If your theme’s colour or size swatches, a filter app, or a “recently viewed” widget link directly to /products/classic-tee?variant=41234567891 instead of the base product URL, you’re sending Google a strong contradictory signal: you’re telling it via the canonical tag that the base URL matters most, while your own site architecture keeps linking to and emphasising the variant URL. Google weighs internal linking patterns as part of how it judges which URL in a duplicate cluster deserves to rank.

2. External links and ad campaigns reinforcing the variant URL

If Google Ads, Meta ads, email campaigns, or affiliate links send traffic to a specific variant URL (common when a merchant wants a customer to land directly on the correct colour or size), and other sites link to or reference that same variant URL, you’ve built up authority signals pointing at the “wrong” page. A canonical tag doesn’t erase the fact that a URL has backlinks, traffic, and, sometimes, historical ranking data attached to it.

3. Legacy indexing that hasn’t been reprocessed

If a variant URL was indexed before the canonical tag existed on your theme (for example, after a theme migration or an older custom theme build), Google doesn’t necessarily revisit and re-evaluate that URL immediately. Recrawling and reprocessing canonicalisation decisions takes time, and low-priority product pages on a large catalogue may not get recrawled for weeks.

4. Thin or near-duplicate content signals

If your variant pages differ only by a swapped product image and a colour name in the title tag (common with poorly configured variant-specific SEO apps), Google may treat the whole cluster as low-value duplicate content and simply pick whichever URL it judges to have the strongest overall signals, which isn’t always the one you canonicalised to.

5. Sitemap or crawl path inconsistencies

Shopify’s own sitemap.xml doesn’t include variant URLs by default, which is good, but third-party apps (some product feed, personalisation, or search/filter apps) sometimes generate their own crawlable paths or JSON-LD structured data that reference variant URLs directly, giving Google another route to discover and weigh them.

How to Check Which Canonical Google Actually Selected

Don’t guess, Google Search Console tells you exactly what it decided, and it’s a two-minute check per URL.

  1. Open URL Inspection in Google Search Console.
  2. Paste in the variant URL you’re concerned about (the full ?variant= version).
  3. Look at the Indexing section of the report for two separate fields:
    User-declared canonical, this is the canonical tag your Shopify theme is outputting. It should show the clean base product URL.
    Google-selected canonical, this is the URL Google has actually chosen to index and potentially rank, after weighing your declared canonical against everything else it knows.
  4. If these two fields match, your canonical signal is being respected. If Google-selected canonical shows the variant URL itself (or a different variant URL than the one you inspected), that’s your confirmation Google is overriding the hint.
  5. Repeat this check on a handful of your highest-traffic or highest-variant-count products, issues are rarely evenly spread across a catalogue; they cluster around products with heavy swatch usage, strong ad spend, or recent handle changes.

A Step-by-Step Framework for Fixing It

Once you’ve confirmed Google is selecting variant URLs over your base product URLs, work through this checklist in order:

  1. Audit internal links for variant URLs. Check your theme’s product template, swatch/variant-picker snippets, and any filter, search, or recommendation apps. Look specifically for <a> tags or JavaScript-driven navigation that hard-codes the ?variant= parameter into href attributes rather than using pushState to update the address bar without generating a crawlable link.
  2. Fix swatch and filter apps at the source. Many popular variant-swatch apps have a setting (or a theme code option) to update the URL via JavaScript history state for user experience, without exposing that URL as an actual crawlable link. If your app doesn’t support this, that’s a legitimate reason to flag it with your developer or app vendor.
  3. Point ad and campaign traffic at base URLs with UTM parameters instead of variant IDs. You can usually achieve “land on this specific colour” behaviour through pre-selected variant JavaScript triggered by a UTM or custom query parameter that isn’t the ?variant= ID itself, avoiding the duplicate-URL problem altogether.
  4. Check structured data and app-generated feeds. Confirm your product schema, and any feeds generated for Google Merchant Center or third-party apps, reference base product URLs, not variant URLs.
  5. Leave Shopify’s sitemap alone, it’s already doing the right thing. Don’t let an app “fix” this by trying to inject variant URLs into the sitemap; that works against you.
  6. Use URL Inspection’s “Validate Fix” won’t apply here since this isn’t a manual action, instead, request re-indexing on the base URL after making changes, and recheck the Google-selected canonical in two to four weeks once Shopify has been recrawled.
  7. Monitor Search Console’s Pages report under the “duplicate, Google chose different canonical than user” filter, this is the single most useful view for catching this issue store-wide rather than product by product.

This is exactly the kind of internal-linking-versus-technical-signal conflict that’s easy to miss when you’re focused on content and campaigns, and it tends to compound across large catalogues. If you’ve worked through the checklist above and Google is still selecting variant URLs across a meaningful chunk of your catalogue, it’s usually a sign the issue is baked into theme code or an app’s URL structure rather than something you can patch page by page, at that point, a proper technical audit through Nexly’s Shopify technical SEO service is the more efficient path, since it involves crawling your live site the way Google does and tracing exactly where the contradictory signals originate.

FAQ

Does Shopify let me edit the canonical tag on variant URLs myself?
Shopify’s default themes already output the correct canonical tag automatically via the canonical_url object in theme.liquid, so most stores don’t need to touch it. It’s technically possible to override this in theme code, but doing so incorrectly can create canonical loops or point pages at the wrong URL, so any manual change should be tested carefully or handled by a developer.

Why is a variant URL showing up in Google instead of my main product page?
Usually because something on or off your site keeps sending strong signals toward the variant URL despite the canonical tag, most often internal links from swatch or filter apps, ad campaigns landing directly on variant URLs, or older indexing that hasn’t been reprocessed since a theme change.

Will fixing my internal links immediately remove the variant URL from Google’s index?
No. Canonicalisation changes take effect only after Google recrawls the affected pages and reprocesses its selected-canonical decision, which typically takes anywhere from a couple of weeks to longer on large catalogues. Checking URL Inspection periodically is the reliable way to confirm the change has taken hold.

Can duplicate variant URLs actually hurt my Shopify store’s rankings?
It’s not a penalty in the traditional sense, but it does dilute ranking signals across multiple URLs instead of consolidating them on one, and it wastes crawl budget on large catalogues, both of which can genuinely suppress how well your product pages perform in search.

Should every Shopify store worry about this?
Not equally. Stores with many variants per product, heavy use of colour/size swatch apps, or paid campaigns that link directly to variant URLs are far more exposed than a small catalogue with simple products and clean internal linking. The URL Inspection check above will quickly tell you whether it’s actually happening on your store.

If you’re not sure whether this is quietly costing you rankings, a Shopify SEO audit is the fastest way to find out, it will show you exactly which URLs Google has selected across your catalogue and where the contradictory signals are coming from.

Niraj Raut
Written by Niraj Raut SEO Manager

Niraj Raut is the SEO Manager and co-founder at Nexly. He helps Australian Shopify and Shopify Plus brands earn durable organic growth through technical SEO, search-led store architecture and content that ranks. He writes about what actually moves rankings for ecommerce.

Connect on LinkedIn
Have a Shopify project? Chat with us, takes 30 seconds.