New: The $100M AI Visibility Roadmap, built from 7,960 live pages and 197 A/B tests. Get it free →

Home / Blog / Canonical Tags SEO: How to Fix Duplicate URL Signals

Technical SEO · 12 min read

Canonical Tags SEO: How to Fix Duplicate URL Signals

A canonical tag tells Google which of several duplicate URLs to index, but it is only a hint. Here is how to make every signal agree, with Shopify defaults we tested and fixes for common errors.

Robert Battle · Updated

Key takeaways
  • A canonical tag is a strong hint, not a directive: Google follows it only when redirects, internal links and your sitemap point to the same URL.
  • Use a 301 when a duplicate URL has no reason to exist, a canonical when it must stay usable, and never noindex or robots.txt to pick a canonical.
  • Shopify canonicalizes collection-aware, variant, sorted and filtered URLs to the clean version by default, and keeps paginated pages self-canonical.
  • The most common Shopify conflict is theme links built with the within filter; linking product cards to the plain product URL fixes it.
  • Compare the user-declared and Google-selected canonical in Search Console's URL Inspection tool to find conflicting signals.

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.

SignalStrength per GoogleBest used forWatch out for
301 or 308 redirectStrongRetiring 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 elementStrongDuplicates that must stay live for shoppers, such as filtered, sorted or tracked URLsMust be in the <head> and use an absolute URL
rel="canonical" HTTP headerStrongPDFs and other non-HTML filesGoogle supports it for web search results only
Sitemap inclusionWeakLarge sites, as a supporting signalListing a URL you canonicalize elsewhere sends mixed signals
HTTPS and internal linksSupportingEvery siteHTTPS 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 noindex as 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 #section URL 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.

Not sure which URLs Google is indexing?

We'll crawl your store, find the duplicate and wrongly canonicalized pages and hand you the fixes in priority order.

Get my technical SEO audit →

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.

SituationUseWhy
The duplicate URL has no reason to exist (old handle, HTTP, non-www)301 redirectStrongest 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)noindexRemoves it from the index; it is not a duplicate of anything
Endless low-value URLs are eating crawl timerobots.txt disallowStops crawling, but does not consolidate signals or deindex
Your content is republished on a partner siteAsk the partner to add noindexGoogle'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 typeExampleDefault canonicalWhat to do
Collection-aware product URL/collections/mens/products/runner/products/runnerKeep the default, and link to the clean URL internally
Variant URL/products/runner?variant=4245.../products/runnerFine for most stores. Split variants into separate products only if each has real search demand.
Tracking parameters/products/runner?utm_source=email/products/runnerNothing to do
Sorted collection/collections/all?sort_by=price-ascending/collections/allNothing to do; default robots.txt also blocks sort_by
Filtered collection/collections/all?filter.v.availability=1/collections/allBuild a dedicated collection for any filter people search for
Paginated collection/collections/all?page=2/collections/all?page=2Keep 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.

Illustrative example: URLs for one Shopify productOne product in 5 collections with 8 variants. All 54 URLs should canonicalize to the clean product URL.
Clean /products/ URL1
Collection-aware URLs5
Variant URLs on clean path8
Variant URLs on collection paths40
Total crawlable URLs54
View the data
Value
Clean /products/ URL1
Collection-aware URLs5
Variant URLs on clean path8
Variant URLs on collection paths40
Total crawlable URLs54

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.

Illustrative example: filter URLs for one collectionCumulative URLs with 10 colors, 8 sizes, 4 materials and 6 sort orders, one value per group at most.
1 No filters 11 + Color 99 + Size 495 + Material 3,465 + Sort order
View the data
Value
No filters1
+ Color11
+ Size99
+ Material495
+ Sort order3,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.

SymptomLikely causeFix
"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 duplicatesAlign 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 youAdd 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 canonicalNothing, unless the listed URL is one you want ranked
Wrong URL ranking, such as a collection-aware product URLTheme links with the within filterLink product cards to {{ product.url }}
Page 2 and beyond missing from the indexPaginated pages canonicalize to page 1Give each page a self-referencing canonical, as Google's pagination guide advises
Canonical ignored after a migrationTag points to a URL that now redirects or returns a 404Update tags to final destination URLs; check with the Redirect Checker
Two canonical tags on one pageAn SEO app and the theme both output a tagRemove 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".

Free: the $100M AI Visibility Roadmap

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.

Get the free roadmap →

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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.

Clean up your index, then grow it

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.

Get my custom plan →
FAQ

Questions & answers

Can a page have more than one canonical tag?
It should have exactly one. When a theme and an app both output a tag, Google receives conflicting signals and may ignore both and choose a canonical on its own.
Is a canonical tag the same as a 301 redirect?
No. A 301 sends shoppers and crawlers to the new URL, while a canonical leaves the duplicate usable and only tells search engines which version to index. Google treats both as strong signals, and a redirect is the better choice when the old URL has no reason to exist.
Can canonical tags point to another domain?
Yes, cross-domain canonicals are valid, but they remain a hint. For content syndicated to partner sites, Google has recommended that the partner add noindex to its copy instead.
Do I need to change Shopify's default canonical tags?
Usually not. Shopify canonicalizes collection-aware, variant, sorted and filtered URLs to the clean version and keeps paginated pages self-canonical. Check your theme's product card links and any SEO apps instead.
How long does it take Google to respect a new canonical?
Google has to recrawl the affected pages first, so it depends on how often your pages are crawled. Check progress in the URL Inspection tool, which shows the Google-selected canonical.
Free custom plan

Find the revenue you're leaving on the table

A free 30-minute call where we build the first version of your plan with you. You leave with a plan either way.

  • Your score across Google, AI citations, branded demand, and reviews
  • The pages on your site that are ready to move right now
  • Your first Flagship page and the first three tests we'd run

Step 1 of 3

Get your free custom plan

Free. Takes about 30 seconds.