Canonical Tags Explained: When to Use rel=canonical and When Not To
Published · 9 min read
A canonical tag tells search engines which URL is the preferred version of a page when several URLs show the same or near-identical content. Google treats it as a strong hint, not a command, and will choose a different canonical when its other signals disagree with the tag. This guide covers the two ways to declare one, the six mistakes that quietly break it, and how to check which URL Google actually picked.
What rel=canonical does
Duplicate URLs are normal. The same product page can be reachable at /shoes/red-runner, /shoes/red-runner?utm_source=newsletter, /shoes/red-runner/, and at http:// and www variants of each. Google sees those as separate URLs and has to decide which one to index. That decision is called canonicalization.
rel="canonical" is your input to that decision. It says: of all these variants, this is the one I want indexed. Google's documentation on consolidating duplicate URLs lists it as one signal among several, alongside 301 redirects, sitemap inclusion, internal linking, and HTTPS. Google weighs them all and picks a canonical itself. When the tag agrees with the other signals, Google almost always follows it; when it does not, Google may override it.
Google describes the tag as a hint, not a directive. In our reading, the practical consequence is that a canonical tag cannot rescue a site whose redirects, links, and sitemap all point somewhere else. It works when it agrees with everything else and is ignored when it is the odd one out.
Two ways to declare a canonical
The HTML link element
The common form is a <link> element in the <head> of the page. Use an absolute URL:
<link rel="canonical" href="https://www.example.com/shoes/red-runner" />One per page, in the head section. Google's documentation is explicit on that; a canonical that a plugin injects into the body is not a canonical.
The HTTP header
Non-HTML files have no head to put a tag in. For a PDF, an image, or a download, send the same information as a Link response header:
Link: <https://www.example.com/downloads/white-paper.pdf>; rel="canonical"Google supports the header form for web search. It is also the practical option when you can set response headers but cannot edit the HTML. Do not send both forms with different values; that is mistake five below.
Self-referencing canonicals
A self-referencing canonical is a tag whose href is the URL of the page it sits on. Google does not require it, but it is good practice, and most CMS platforms emit one by default.
The reason it helps is parameter variants. If /shoes/red-runner?utm_source=newsletter returns the same HTML as the clean URL, and that HTML contains a canonical pointing at https://www.example.com/shoes/red-runner, then every tracking, sorting, and session variant carries a pointer back to the clean version. Without it, Google has to infer that from content similarity, which is slower and less reliable.
Two things to check on a self-referencing canonical:
- The value must be the exact final URL: same protocol, host, and trailing slash as the URL that returns 200. A canonical to
http://on an HTTPS site is a self-reference in intent only. - It must be fixed per page, not built from the request. A template that writes the request URL into the canonical puts
?utm_source=newsletterinto the canonical of the parameter variant, which tells Google the variant is its own canonical.
Aura's free scan checks only whether a canonical tag is present on the page you scan, as one of its 18 site-side checks; it does not fetch the target or compare it with Google's choice.
When Google picks a different canonical
Google can and does override the tag. The cases are all versions of the same thing: the other signals disagree with it.
- The canonical target redirects, returns an error, or is blocked by robots.txt. Google cannot index a URL it cannot fetch, so it picks a duplicate that it can.
- The canonical target carries a noindex. Same problem.
- Internal links, the sitemap, and redirects point to a different variant than the tag does. Google follows the weight of the evidence.
- The pages are not actually duplicates. Google may index
/shoes/red-runnerand/shoes/blue-runnerseparately even if both canonicalize to/shoes/runner. - An HTTP page canonicalizes to itself while an HTTPS twin exists. Google's documentation states that it prefers HTTPS pages over equivalent HTTP pages as the canonical.
To see what happened on a specific URL:
- Open Google Search Console and select the property.
- Paste the full URL into the URL Inspection field at the top.
- In the result, expand the Page indexing section.
- Compare the two lines: User-declared canonical (what your tag says) and Google-selected canonical (what Google indexed).
- If they differ, inspect the Google-selected URL as well and check its redirects, robots.txt status, and noindex.
When Google agrees with you, the Google-selected line reads “Inspected URL”. When it does not, the Page indexing report status “Duplicate, Google chose different canonical than user” lists every URL in the same state. Check that report before fixing a single page: canonical problems are almost always template problems.
Six common canonical mistakes
Each of these is easy to introduce and hard to notice, because the page still renders and the tag is still present.
| Mistake | What goes wrong | Fix |
|---|---|---|
| Canonical to a redirecting URL | Google has to follow the redirect to find the real target. The signal weakens with each hop, and Google may settle on the page itself instead. | Point at the URL that returns 200 directly, with no hops. |
| Canonical to a noindex page | The tag says “index that one”; the noindex says “do not”. Google's documentation says not to combine noindex with canonical for duplicate control. | Decide which you mean. If the target should be indexed, remove its noindex. If no version should be indexed, noindex all of them and drop the canonical. |
| Cross-domain by accident | A template copied from another site, or a staging hostname baked into config, tells Google that every page really lives on a different domain. | Build the host from a single environment setting. Check view-source on production after every deploy. |
| Relative URL | href="/shoes/red-runner" resolves against whichever host and protocol served it, so http, www, and staging copies each canonicalize to themselves. Google's documentation says to use absolute URLs. | Use the full absolute URL, including protocol and host. |
| Multiple canonical tags | A plugin and a theme both emit one, with different values. In our reading, Google discards conflicting declarations and decides on its own. | One tag per page. Find and remove the second source. |
| Canonicalizing paginated pages to page 1 | Pages 2 to n declare themselves duplicates of page 1, so their content, and the items linked only from them, can drop out of the index. Google's documentation lists this as a mistake. | Give every page in the series a self-referencing canonical. |
Canonical vs 301 vs noindex
These three answer different questions. A 301 removes a URL. A canonical consolidates URLs that stay. A noindex hides a URL that is not a duplicate of anything.
| Situation | Use | Why |
|---|---|---|
| The old URL should stop existing (renamed, moved, merged) | 301 redirect | Users and crawlers both land on the new URL; nothing is left behind. |
| Both URLs must stay live (tracking parameters, sort orders, print view) | rel=canonical | Users keep the variant they arrived on; search gets one address. |
| The same article is republished on another site with permission | Cross-domain rel=canonical on the copy | The copy stays readable; the original is credited in search. |
| The page exists for users but should not be in search (site search results, thank-you pages) | noindex | It is not a duplicate. It simply should not be indexed. |
| Site move: new domain, or http to https | 301, site-wide | A tag alone is too weak a signal for a move. Redirects carry it. |
| A paginated series | None of the three | Each page is its own page. Self-canonical every one. |
Do not stack them. Canonical plus noindex is a contradiction, and a canonical on a page that 301s is never read.
www, trailing slash, and HTTPS consistency
Canonicalization starts before the tag. Most sites can serve the same page in up to eight forms: http or https, www or bare host, trailing slash or none. Google's documentation says HTTPS is preferred when the versions are otherwise equal. Beyond that the choice is yours, as long as every signal agrees with it.
- Redirects. The other seven forms 301 to the chosen one, in a single hop.
- Canonical tag. Matches the chosen form exactly, trailing slash included.
- Sitemap. Lists only the chosen form. Google uses sitemap inclusion as a canonicalization signal, so a sitemap of slashless URLs on a slashed site works against the tag. The XML sitemap guide covers keeping the two in sync.
- Internal links. Use the chosen form. A menu linking to
/about/while the canonical says/aboutsends a mixed signal from every page. - Search Console. Verify a property for the chosen form, or a Domain property that covers all of them.
Check the redirect chain from the command line:
curl -I http://example.com/about
HTTP/1.1 301 Moved Permanently
Location: https://www.example.com/about/One hop. If the first response redirects to https and a second then redirects to www, the rules are ordered wrong, and every crawl pays for it twice. Canonical consistency is one line in the technical SEO checklist, but it is the line most often broken by a CMS migration or CDN change, so re-check it after either.
Frequently asked questions
Is rel=canonical a directive that Google must follow?
No. Google treats rel=canonical as a strong hint, not a directive. It combines the tag with other signals — redirects, sitemap inclusion, internal links, HTTPS, and its own duplicate detection — and can choose a different canonical when those signals disagree with the tag. The URL Inspection tool in Search Console shows both the user-declared canonical and the Google-selected canonical for any page.
Should every page have a self-referencing canonical tag?
Google does not require it, but it is good practice. A self-referencing canonical states the preferred URL explicitly, so parameter variants, tracking URLs, and http or www copies all carry a pointer back to one address. Most CMS platforms add it by default. If you add it yourself, make sure the value is the exact final URL, including the protocol, host, and trailing slash you actually serve.
What is the difference between a canonical tag and a 301 redirect?
A 301 redirect sends both users and crawlers to the new URL; the old URL stops being a page. A canonical tag keeps both URLs live for users and only asks search engines to consolidate them under one address. Use a 301 when the old URL should no longer exist. Use a canonical when both versions must stay reachable, such as a tracking-parameter variant or a print view.
How do I see which canonical Google chose for a page?
Open Google Search Console, paste the URL into the URL Inspection tool, and expand the Page indexing section. It lists the user-declared canonical (what your tag says) and the Google-selected canonical (what Google actually indexed). If the two differ, Google has overridden your tag, and the other signals on that URL — redirects, robots.txt, noindex, internal links — need to be checked.