A canonical tag is a line of HTML, <link rel="canonical" href="https://example.com/page">, that tells Google which URL you want indexed when several URLs show the same or nearly the same content. Google treats it as a strong hint, not a command, so canonical tags SEO only works when your redirects, internal links and sitemap all point to the same URL.
This guide is for e-commerce teams, especially on Shopify, who see "Duplicate" statuses in Search Console or suspect that filter, variant and collection URLs are splitting their rankings. You will get the exact rules from Google's documentation, what Shopify does by default (we tested it), a symptom and fix table for the most common canonical errors, and a step-by-step audit you can run this week.
What is a canonical tag?
Google defines canonicalization as the process of selecting the representative URL for a piece of content. When it finds a set of duplicate or near-duplicate pages, it picks one as the canonical, crawls it most often and shows it in search results. The others are treated as alternates.
The canonical tag is how you state your preference. It goes in the <head> of the duplicate page and points to the version you want indexed:
<link rel="canonical" href="https://www.example.com/products/merino-runner">
What a canonical tag does not do
- It is not a redirect. Shoppers can still load the duplicate URL. Only search engines read the tag.
- It is not a guarantee. Google's canonicalization docs say plainly that indicating a canonical preference is a hint, not a rule. If your other signals disagree, Google picks its own.
- It is not a penalty fix. Google states that some duplicate content on a site is normal and is not a violation of its spam policies. The real cost of duplicates is diluted signals, wasted crawling and the wrong URL showing in search.
- It does not boost rankings on its own. It consolidates signals onto one URL. That URL still has to earn its position.
Why duplicate URLs happen
Google lists five common causes: region variants (a US and a UK page with the same content), device variants (separate mobile URLs), protocol variants (HTTP and HTTPS), site functions such as sorting and filtering on category pages, and accidental variants such as a staging site left open to crawlers. Online stores add a few of their own: tracking parameters, variant parameters and products that live inside several collections.
How Google chooses the canonical URL
Google weighs several signals together, and its documentation says they stack: they become more effective when combined. Your job is to make every signal agree. The table below summarizes Google's "How to specify a canonical URL" guide.
| Signal | Strength per Google | Best used for | Watch out for |
|---|---|---|---|
| 301 or 308 redirect | Strong | Retiring a duplicate URL for good (old domain, HTTP, old handle) | Only when nobody needs the old URL. Server-side redirects take effect fastest. |
rel="canonical" link element | Strong | Duplicates that must stay live for shoppers, such as filtered, sorted or tracked URLs | Must be in the <head> and use an absolute URL |
rel="canonical" HTTP header | Strong | PDFs and other non-HTML files | Google supports it for web search results only |
| Sitemap inclusion | Weak | Large sites, as a supporting signal | Listing a URL you canonicalize elsewhere sends mixed signals |
| HTTPS and internal links | Supporting | Every site | HTTPS to HTTP redirects or bad certificates push Google toward HTTP |
Google also prefers URLs that are part of reciprocal hreflang clusters when it chooses canonicals, which matters if you run separate regional storefronts.
What Google says not to use
- robots.txt. Blocking a duplicate does not consolidate anything. Google may still index a disallowed URL without its content, and it cannot see the canonical tag on a page it is not allowed to crawl.
- The URL removal tool. It hides every version of the URL from search, including the one you want.
- noindex. Google does not recommend
noindexas a way to pick a canonical within a single site. A page that says "do not index me" and "my canonical is X" at the same time is a contradiction. - Fragments. Do not declare a
#sectionURL as canonical. Google generally ignores fragments. - Conflicting methods. Do not name one URL in the tag and a different one in your sitemap or header.
How to add a canonical tag correctly
The syntax is simple. The mistakes come from templates, JavaScript and plugins that write the tag differently on different page types.
The HTML element
Place one tag per page, inside the <head>, with a full absolute URL including protocol and host:
<link rel="canonical" href="https://www.example.com/collections/running-shoes">
Google only accepts the element in the <head>. If a script or an unclosed tag pushes it into the <body>, it is ignored. Google also recommends putting the canonical in the HTML source and making sure JavaScript does not change it after the page loads.
The HTTP header for PDFs and files
For a spec sheet or size guide PDF that exists at more than one URL, send the canonical as a response header:
Link: <https://www.example.com/downloads/size-guide.pdf>; rel="canonical"
Self-referencing canonicals
Google's guide says to include a canonical link on the canonical page itself. A self-referencing tag means that when someone links to /products/merino-runner?utm_source=newsletter, the page still declares the clean URL as its preferred version. Every indexable page should have one.
Canonicals and hreflang
For international stores, each language version should canonicalize to itself, not to the English page, and list its alternates with hreflang. Google says to choose a canonical in the same language, or the best substitute language if none exists. A tag such as <link rel="canonical" hreflang="en-gb" href="..."> is not used for canonicalization at all; alternates belong in rel="alternate" links.
We'll crawl your store, find the duplicate and wrongly canonicalized pages and hand you the fixes in priority order.
Canonical tags vs 301 redirects vs noindex
These three tools solve different problems, and picking the wrong one is the most common root cause of canonical issues. Use this decision table before you change anything.
| Situation | Use | Why |
|---|---|---|
| The duplicate URL has no reason to exist (old handle, HTTP, non-www) | 301 redirect | Strongest signal, and users land on the right page too |
| The duplicate must stay usable (sorted, filtered, tracked, variant URLs) | rel="canonical" | Consolidates signals while the URL keeps working for shoppers |
| A page should not appear in search at all (internal search results, thank-you pages) | noindex | Removes it from the index; it is not a duplicate of anything |
| Endless low-value URLs are eating crawl time | robots.txt disallow | Stops crawling, but does not consolidate signals or deindex |
| Your content is republished on a partner site | Ask the partner to add noindex | Google's John Mueller recommended this for syndicated copies in June 2023, because a cross-domain canonical is only a hint |
For filter-heavy stores, crawl control and canonicals work together. Our guide to faceted navigation SEO covers which filter pages deserve to be indexed and which should be kept out of the crawl entirely.
Canonical tags on Shopify: what happens by default
Shopify themes output the canonical tag from the Liquid object {{ canonical_url }}. Dawn, Shopify's reference theme, has this line in layout/theme.liquid:
<link rel="canonical" href="{{ canonical_url }}">
Shopify's Liquid reference only describes canonical_url as "the canonical URL for the current page," so we checked its behavior directly. In October 2026 we requested each URL type below on two live Shopify stores and recorded the canonical tag each returned. Both stores behaved the same way.
| URL type | Example | Default canonical | What to do |
|---|---|---|---|
| Collection-aware product URL | /collections/mens/products/runner | /products/runner | Keep the default, and link to the clean URL internally |
| Variant URL | /products/runner?variant=4245... | /products/runner | Fine for most stores. Split variants into separate products only if each has real search demand. |
| Tracking parameters | /products/runner?utm_source=email | /products/runner | Nothing to do |
| Sorted collection | /collections/all?sort_by=price-ascending | /collections/all | Nothing to do; default robots.txt also blocks sort_by |
| Filtered collection | /collections/all?filter.v.availability=1 | /collections/all | Build a dedicated collection for any filter people search for |
| Paginated collection | /collections/all?page=2 | /collections/all?page=2 | Keep the self-referencing canonical |
In short, Shopify's defaults are sound. Most canonical problems on Shopify come from theme code, apps and internal linking, not from the platform.
The collection URL problem is about links, not tags
Many themes build product card links with the Liquid within filter, which outputs collection-aware URLs such as /collections/sale/products/runner. Shopify's own Liquid docs warn that a standard product page and a product page in the context of a collection have the same content on separate URLs. The canonical tag still points to /products/runner, but if every internal link points somewhere else, you are sending Google two conflicting signals, and Google may pick the collection URL as canonical.
The fix is usually one line in your product card snippet. Replace:
{{ product.url | within: collection }}
with:
{{ product.url }}
Dawn already links product cards to {{ card_product.url }} without within. Older and heavily customized themes often do not.
How duplicate URLs multiply on a store
Canonical tags matter more for stores than for almost any other kind of site, because catalogs generate URLs combinatorially. Take one product that sits in five collections and has eight variants. On Shopify, it can be reached at the clean product URL, at five collection-aware URLs, and at a ?variant= URL on each of those six paths.
View the data
| Value | |
|---|---|
| Clean /products/ URL | 1 |
| Collection-aware URLs | 5 |
| Variant URLs on clean path | 8 |
| Variant URLs on collection paths | 40 |
| Total crawlable URLs | 54 |
Source: QCK illustrative calculation
That is 54 crawlable URLs for one product, all of which should resolve to a single canonical. Multiply by a catalog of 500 products and you have tens of thousands of potential duplicates before you count tracking parameters.
Collections grow even faster once filters stack. The example below assumes a shopper picks at most one value from each filter group. Real storefronts usually allow several values per group, which makes the totals far larger.
View the data
| Value | |
|---|---|
| No filters | 1 |
| + Color | 11 |
| + Size | 99 |
| + Material | 495 |
| + Sort order | 3,465 |
Source: QCK illustrative calculation
A canonical tag consolidates indexing signals across those URLs, but Google still has to crawl a URL to read its tag. That is why large catalogs pair canonicals with robots.txt rules for filter and sort parameters, as Shopify's default robots.txt already does for sort_by. If Search Console shows thousands of these URLs as crawled, read our guides on index bloat and crawl budget.
Common canonical errors and how to fix them
Most canonical problems surface in Search Console's Page indexing report. Here is what each status means and what usually causes it.
| Symptom | Likely cause | Fix |
|---|---|---|
| "Duplicate, Google chose different canonical than user" | Internal links, sitemap or redirects point to a different URL than your tag, or the two pages are not true duplicates | Align internal links and the sitemap with the declared canonical; if the pages differ, make each one distinct and self-canonical |
| "Duplicate without user-selected canonical" | The page has no canonical tag, so Google picked one for you | Add self-referencing canonicals in the template; this status alone is not an error |
| "Alternate page with proper canonical tag" | Working as intended: the page points to an indexed canonical | Nothing, unless the listed URL is one you want ranked |
| Wrong URL ranking, such as a collection-aware product URL | Theme links with the within filter | Link product cards to {{ product.url }} |
| Page 2 and beyond missing from the index | Paginated pages canonicalize to page 1 | Give each page a self-referencing canonical, as Google's pagination guide advises |
| Canonical ignored after a migration | Tag points to a URL that now redirects or returns a 404 | Update tags to final destination URLs; check with the Redirect Checker |
| Two canonical tags on one page | An SEO app and the theme both output a tag | Remove one so the page declares a single canonical |
Check a single URL in Search Console
The URL Inspection tool shows two fields side by side: "User-declared canonical," which is what your page says, and "Google-selected canonical," which is what Google actually chose. When they match, your signals agree. When they differ, compare the two pages and look for the signal that is pulling Google the other way. Google notes the selected canonical can lag the index by a few hours.
Pagination deserves its own note
Older advice told stores to canonicalize every paginated page to page 1. Google's current e-commerce pagination guide says not to use the first page of a paginated sequence as the canonical page. Each page should have its own URL, such as ?page=2, and link to the next with a regular <a href> link. Google no longer uses rel="next" and rel="prev".
The playbook we use to get e-commerce brands cited by ChatGPT, Google AI Overviews and Perplexity, built from 7,960 live pages and 197 A/B tests.
How to audit canonical tags step by step
You can audit canonicals on a mid-sized store in an afternoon. Work through these steps in order, because each one narrows where to look next.
- Pull the Page indexing report. In Search Console, export URLs under "Duplicate, Google chose different canonical than user" and "Duplicate without user-selected canonical." Group them by template: products, collections, blog posts, pages.
- Crawl the site. Use a crawler to list every URL with its canonical tag, status code and indexability. Flag pages with no canonical, more than one, a relative URL, or a canonical that points to a non-200 or noindexed URL.
- Inspect a sample in Search Console. Run five to ten URLs per template through URL Inspection and compare the user-declared and Google-selected canonicals.
- Check internal links. Confirm navigation, product cards, breadcrumbs and related-product blocks link to canonical URLs. The Internal Link Checker helps spot links to non-canonical versions.
- Check the sitemap. Every URL in your XML sitemap should be the canonical version and return a 200. The XML Sitemap Checker surfaces redirects and errors in the file. Shopify generates its sitemap automatically, so problems usually trace back to theme links or apps.
- Fix templates, not pages. Canonical errors almost always come from a theme file, an app or a CMS setting. Fix the source once rather than patching URLs one by one.
- Validate and wait for recrawl. Use "Validate fix" in the Page indexing report and recheck the same sample URLs in a few weeks. Google has to recrawl a page before it processes a changed tag.
Canonical tags after a migration or redesign
Migrations are where canonical errors pile up. Staging domains leak into production tags, old handles stay in hard-coded canonicals, and apps reinstall with their own defaults. Before launch, crawl the staging site and confirm every canonical uses the production domain and the new URL structure. After launch, crawl again and check that no canonical points at a redirected URL, since a canonical to a redirect forces Google to reconcile two signals instead of one.
Keep the old URLs redirecting with 301s to their exact new equivalents rather than relying on canonicals alone. Redirects are the stronger signal and they carry shoppers along too. Our Shopify SEO migration guide and the redirect chains guide cover the redirect side in detail.
Next steps for cleaner canonical signals
Start with Search Console: if "Google chose different canonical than user" is a small share of your pages, you have a few signal conflicts to align, not a crisis. Fix the template that produces them, link internally to canonical URLs, keep your sitemap clean and give every indexable page a self-referencing tag. On Shopify, check your product card links first, because that single change resolves the most common conflict we see in theme code.
If you would rather have a specialist check your canonicals, redirects and crawl setup together, our technical SEO team can run the audit with you. You can also get in touch for a free review.
Book a free 30-minute call. We'll show you the technical issues costing you rankings and the pages ready to move once they're fixed.