Home Blog SEO
SEO

Shopify canonical tags: 5 common errors and their fixes

Shopify auto-generates canonicals, but fails in 5 scenarios (variants, filters, tags, multi-domain). Liquid snippets to fix each in the theme.

Lionel Fenestraz · 24 June 2026 · 9 min read · Updated: June 2026
HTML inspection of a Shopify product showing the link rel canonical tag
In this article

Shopify auto-generates canonical tags on every page, but there are five scenarios where the automatic generation breaks and creates duplicate content in Google’s eyes. Product variants, products accessed from multiple collections, search filters, tag URLs and parallel domains: in all of these you have to manually check that the canonical points to the URL you want ranking, not the one Shopify decides on.

This guide explains how canonicals work in Shopify, the most costly errors I see in audits, and the Liquid snippets to correct them in the theme when the automatic fix doesn’t go far enough. For the full picture of Shopify technical SEO, Shopify SEO for ecommerce 2026 covers canonicals alongside the rest of the checklist.

In 30 seconds:

  • Shopify’s canonical is generated via {{ canonical_url }} in theme.liquid and respects the primary domain (Google canonical guide, 2025)
  • 5 scenarios where auto-generation fails: product variants, products in collections, search filters, tags, multi-domain
  • A misaimed canonical consolidates ranking signals on the wrong URL — Google sometimes ignores the canonical and picks another
  • Quick audit method: view-source the 5 main templates and verify <link rel="canonical"> points to the expected canonical URL
  • SEO apps that rewrite canonicals are a frequent source of issues — they duplicate or override the theme’s

How does Shopify generate canonical tags by default?

Shopify exposes a Liquid variable {{ canonical_url }} inserted into the theme’s <head>. By default, this variable points to the cleanest available URL for that page: the product URL, the collection or the page without tracking parameters. That means it automatically excludes UTM and app tracking parameters, points to the primary domain when multiple domains exist (not to myshopify.com), and keeps the URL with consistent trailing-slash usage.

Where the native variable falls short is in five specific scenarios you’ll find in any active store: product variants accessed via ?variant=12345, the same product accessed via different collections (/collections/X/products/Y vs /products/Y), collection pages with filters applied (?filter.p.tag=red), specific tag pages (/collections/all/red), and the rare cases of subdomains or alternate domains that show up during migrations. All five require manual intervention.

5 scenarios where the automatic canonical fails Each one requires manual intervention in the theme 1. Product variants ?variant=12345 · colour landing pages 2. Product in multiple collections /collections/X/products/Y vs /products/Y 3. Collection filters ?filter.p.tag=rojo 4. Tag pages /collections/all/rojo 5. Multi-domain and subdomains alternate domains during migrations

When I audit a Shopify store, the first test is opening 5 random products, view-source, and verifying the <link rel="canonical"> tag. If all 5 point to https://[domain].com/products/[handle] without parameters, the basic canonical is fine. Serious problems start when variants, filters or third-party apps come into play.


What problems do misaimed canonicals create?

A misaimed canonical is one of the quietest SEO errors on Shopify because the store keeps working perfectly — only Google doesn’t consolidate ranking signals where it should. Three concrete consequences:

Distribution of authority across duplicate URLs. If /collections/summer/products/red-tshirt and /products/red-tshirt both have canonicals pointing to themselves, Google sees two distinct pages with the same content. Backlinks reaching the collection version stay there instead of transferring to the canonical product.

Indexation of URLs with parameters. If filtered URLs (?filter.p.tag=...) don’t have a canonical pointing to the base collection, Google may index them and the SERP fills with variations of the same product. I’ve seen this especially in stores with many tags, where 20 versions of the same collection end up in the index.

Conflict between canonical and hreflang. In multi-language stores with Shopify Markets, if the canonical points to the wrong language, Google may ignore the hreflang annotations and consolidate signals on the incorrect version. It’s a rare but costly problem because it breaks international SEO globally.

To detect them without touching anything, a Shopify technical SEO audit cross-checks sitemap, canonicals and hreflang in one pass and returns an exact map of duplicate URLs.


How do I fix canonicals on product variants?

Variants are the most frequent issue. When a user lands on /products/tshirt?variant=12345, Shopify by default generates a canonical pointing to the URL without the variant parameter, which is correct in most cases. But there are three exceptions where the default behaviour causes problems:

  • Variants with custom URLs, for example when you use an app to create “colour landing pages” (/products/red-tshirt, /products/blue-tshirt as separate URLs). Each needs its own canonical pointing to itself, not to the parent product.
  • Variants accessed from campaigns with UTM: ?variant=12345&utm_source=meta. The correct canonical is /products/tshirt without parameters, and Shopify gets this right by default.

To force a specific canonical on a variant, override the native variable in the theme’s head. The snippet in layout/theme.liquid:

{% if template contains 'product' and product.selected_variant and request.path contains '?variant=' %}
  <link rel="canonical" href="{{ shop.url }}{{ product.url }}">
{% else %}
  <link rel="canonical" href="{{ canonical_url }}">
{% endif %}

This snippet forces any URL with ?variant= to always point to the parent product, ignoring the selected variant in the canonical.


What to do with products in multiple collections?

Shopify handles this well by default: the URL /collections/summer/products/red-tshirt has a canonical pointing to /products/red-tshirt. The problem appears when a third-party SEO app overrides that canonical, or when the theme has a canonical hardcoded in templates/product.liquid instead of in layout/theme.liquid.

To verify quickly, open a URL with a collection (https://yourstore.com/collections/X/products/Y) and view-source looking for the <link rel="canonical" tag. The href should be https://yourstore.com/products/Y without the collection. If it includes /collections/ instead, there’s a problem. The two most common causes: an SEO app adding its own canonical (review installed apps) or the theme has the canonical in product.liquid instead of inheriting from theme.liquid. The fix: remove duplicate canonicals and use only {{ canonical_url }} in the global head. If canonicals are fine but old URLs with 301 redirects are pointing wrong, Shopify redirects and SEO covers how to handle that case.


How do I handle canonicals with collection filters and tags?

Filters in Shopify generate URLs like /collections/tshirts?filter.p.tag=red or /collections/all/red. These URLs are useful for users but shouldn’t rank independently — they should all consolidate signals on the base collection.

Shopify generally does this well for filters with parameters (?filter.p.tag=), where the canonical points to /collections/tshirts. But the URL /collections/all/red is more problematic: technically it’s a new URL semantically equivalent to a filter, and by default the canonical points to itself.

The recommended fix depends on your SEO strategy. If you want tag pages to rank (because you have unique content for “red tshirts”), leave them as is. If you want to consolidate everything on main collections, modify the canonical in templates/collection.liquid to point to the base tag:

{% if collection.handle == 'all' and current_tags %}
  <link rel="canonical" href="{{ shop.url }}/collections/all">
{% endif %}

Making this decision without first checking current traffic to tag pages is a mistake. If Search Console shows /collections/all/red URLs receive traffic, eliminating them via canonical loses rankings. Audit before changing.


How do I verify all canonicals on the store without auditing one by one?

For stores with 100+ URLs, manual doesn’t scale. Three tools I combine:

ToolWhat it doesWhen to use
Screaming FrogFull site crawl, extracts canonical for each URLInitial full-site audit
Search ConsoleShows “Page indexed, but not submitted in sitemap” and “Duplicate without user-selected canonical”Detect canonicals Google ignores
curl + grepQuick canonical inspection on 5-10 specific URLsValidate after a change

Useful command to validate the canonical of a specific URL:

curl -s https://yourstore.com/products/red-tshirt | grep -oE '<link rel="canonical"[^>]+>'

When Search Console reports “Duplicate without user-selected canonical”, it means Google found duplicate URLs, ignored the canonical and picked the canonical URL on its own. That report is the clearest signal that the canonical isn’t working as you expect. The steps: review affected URLs in the report, manually verify the canonical points where you want, and if it’s pointing correctly, investigate why Google ignores it (near-identical content is the #1 cause).


Frequently asked questions

Can Shopify SEO apps corrupt canonical tags?

Yes, and it’s one of the most frequent causes I see in audits. Apps like SEO Manager, Smart SEO or Plug in SEO can add their own <link rel="canonical"> to the head without removing the theme’s. Result: two canonicals on the same page, and Google picks one (not necessarily the right one). If your site has an SEO app installed, view-source to verify only one canonical appears.

What about canonicals on checkout and account pages?

Checkout (/checkout/*), account (/account/*) and order (/orders/*) pages are blocked in Shopify’s default robots.txt, so their canonicals don’t matter for SEO. Google doesn’t crawl them. If you modify robots.txt.liquid to allow crawling, make sure to add noindex to those pages or they’ll index and appear in SERP.

Should I use canonical to manage pagination on collections?

No. For pagination (/collections/tshirts?page=2), using canonical pointing to page 1 is no longer recommended by Google since 2019. Google now prefers each paginated page to have its own self-canonical, or treats them as a series via rel="next"/rel="prev" (also deprecated). In practice, leaving each paginated page with a self-canonical and trusting Google to treat them as a group is the most stable solution.

How do I test if a canonical change actually took effect?

Three validations after a change: (1) view-source the modified URL and confirm the new canonical, (2) in Search Console > URL Inspection, paste the URL and verify Google reads it correctly (“Test live URL” button), and (3) wait 2-4 weeks and check if “Duplicate without user-selected canonical” disappears in Search Console.

Does Shopify Plus offer more canonical control?

Not directly. Plus doesn’t add new canonical options; the extra control comes from being able to edit robots.txt.liquid and from Shopify Functions for custom logic. But the actual canonical editing still happens via Liquid in theme.liquid, same as on any plan.

How does Shopify Markets affect canonicals on translated URLs?

Shopify Markets respects per-language canonicals — each translated URL (/es/products/X, /en/products/X) has its own canonical pointing to itself. What gets managed via hreflang are the alternate versions, not cross-locale canonicals. Mixing canonicals across languages is one of the costliest errors and breaks international SEO. If the theme doesn’t respect this separation, the correct snippets are in Shopify Liquid for SEO.


Sources

  1. Google Search Central. Consolidate duplicate URLs. https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls. 2025.
  2. Shopify Dev. Canonical URLs in Liquid. https://shopify.dev/docs/api/liquid/objects/canonical_url. 2025.
  3. Google Search Central. URL canonicalization. https://developers.google.com/search/docs/crawling-indexing/canonicalization. 2025.
  4. Shopify Help. SEO settings for collections. https://help.shopify.com/en/manual/online-store/themes/themes-by-shopify/dawn/dawn-collection-pages. 2025.
  5. Google Search Central. URL Inspection Tool. https://support.google.com/webmasters/answer/9012289. 2025.

Is Search Console flagging “Duplicate without user-selected canonical” on your Shopify and you don’t know where the problem is? I offer Shopify technical SEO audits — full map of duplicate or misaimed canonicals with remediation plan. 30-minute initial call, no commitment.

Lionel Fenestraz — Freelance Google Ads & Meta Ads Consultant
Lionel Fenestraz
Freelance PPC & CRO Consultant · Google Partner · CXL Certified · Google Ads Search Certified
7+ years managing Google Ads and Meta Ads for vacation rental, B2B and ecommerce. Trilingual ES/EN/FR.
Free first call

Could your ad campaigns
perform better?

30 minutes to review your situation and tell you exactly what I would change. No pitch, no sales proposal.

Book a call →
30 min · Google Meet · No commitment