What is a canonical tag? Canonical URLs in SEO explained
What is a canonical tag in SEO, what it is used for, when you would use one, and the mistakes that send Google the wrong signal. Written for founders, with examples.

A canonical tag is a line in a page’s head, <link rel="canonical" href="...">, that tells search engines which URL is the main version when several URLs show the same content. Google treats it as a strong signal, not an order. Add a self-referencing canonical to every page, point duplicates at the main version with an absolute URL, and never let your canonical, redirects, and sitemap disagree.
What is a canonical tag? It is an HTML element that tells search engines which URL is the preferred version of a page when the same content is reachable at more than one address. Google calls that preferred version the canonical URL, and it is the one that appears in search results.
<link rel="canonical" href="https://yoursite.com/pricing" />It goes in the head of the page. Most frameworks and website builders add it for you once you set the page’s canonical URL.
What is a canonical tag in SEO used for?
Duplicate URLs happen on almost every site without anyone meaning to create them. Google lists common causes:
- Protocol and host variants: http and https, or www and the bare domain.
- Tracking and filter parameters:
?utm_source=reddit,?sort=price,?ref=producthunt. - Device or region variants: a separate mobile site, or near-identical US and UK pages.
- Leftovers: a staging or demo site that crawlers can reach.
When Google finds several pages with the same main content, it groups them and picks one as canonical. The canonical gets crawled most often, and the duplicates less. The tag lets you tell Google which one you want, so links and signals add up on a single URL instead of being split across five.
When would you use a canonical tag?
| Situation | What to do |
|---|---|
| Every normal page | Add a self-referencing canonical pointing to its own clean URL |
| Links shared with tracking parameters | Keep the canonical on the URL without the parameters |
| The same article published on another site | Ask the other site to add a canonical pointing back to your original |
| Sorting or filtering options on one listing | Point variants to the main listing URL |
| A page that moved for good | Use a redirect, not a canonical |
- SituationEvery normal page
- What to doAdd a self-referencing canonical pointing to its own clean URL
- SituationLinks shared with tracking parameters
- What to doKeep the canonical on the URL without the parameters
- SituationThe same article published on another site
- What to doAsk the other site to add a canonical pointing back to your original
- SituationSorting or filtering options on one listing
- What to doPoint variants to the main listing URL
- SituationA page that moved for good
- What to doUse a redirect, not a canonical
Google recommends a self-referencing canonical on the main page too, not only on the duplicates. It removes ambiguity when the page is reached through a link with extra parameters, which is exactly what happens on launch day when every surface adds its own tag.
Canonical tag vs redirect vs sitemap
Google lists three ways to state a preference, from strongest to weakest:
- 1Redirects: a strong signal that the redirect target should be canonical. Use them when the old URL should disappear.
- 2rel="canonical": a strong signal. Use it when both URLs must keep working, such as a page with tracking parameters.
- 3Sitemap inclusion: a weak signal. Every URL in your sitemap is treated as a suggested canonical.
The methods add up when they agree. When they disagree, Google has to guess. That is why your sitemap should list only canonical URLs, which the sitemap validator helps you check.
Canonical tag mistakes to avoid
- Pointing every page at the homepage. It suggests your other pages are duplicates of it, so they may not be shown in search.
- Conflicting signals. Google warns against naming one URL in your sitemap and a different one in the canonical tag for the same page.
- Relative URLs. Google supports them but recommends absolute URLs, because relative ones break if a staging copy gets crawled.
- Using robots.txt to hide duplicates. Google can still index a blocked URL without its content, and it cannot read the canonical on a page it cannot crawl.
- Canonicalising to a redirect or an error. The target should return 200 and be the real final URL.
How to check your canonical URL
- 1View the page source and search for
rel="canonical". There should be exactly one, with an absolute URL. - 2Open the URL Inspection tool in Google Search Console. It shows the user-declared canonical, which is yours, and the Google-selected canonical, which is Google’s choice.
- 3If they differ, look for conflicting signals: redirects, internal links, or sitemap entries pointing at the other version.
Google chooses the canonical it thinks is most useful for searchers, so a mismatch is not always an error. It is worth investigating when your important pages show a Google-selected canonical you did not intend. Our article on how long Google takes to index a new website covers the related indexing statuses.
Frequently asked questions
What is a canonical tag in simple terms?
It is a note in a page’s HTML telling search engines which address is the main version of that page, so duplicates do not compete with each other in search results.
Does Google always follow the canonical tag?
No. Google treats rel="canonical" as a strong signal, not a directive, and weighs it with redirects, sitemaps, and links. It can choose a different canonical if the signals disagree.
Should every page have a self-referencing canonical?
Yes, Google recommends it. A canonical pointing to the page’s own clean URL keeps parameter and tracking variants from being treated as separate pages.
Is a canonical tag the same as a redirect?
No. A redirect sends visitors and crawlers to another URL. A canonical keeps both URLs working and only tells search engines which one to show. Use a redirect when a page has moved for good.
One clean URL for your product, from day one.
Launch on DanielLaunches and get a permanent, self-canonical product page that keeps earning visits after launch day.
Get my roadmapRead next
Sources
- Google Search Central: How to specify a canonical URL - rel="canonical", redirects, and sitemaps ranked by signal strength, plus best practices
- Google Search Central: What is URL canonicalization - why duplicate URLs happen and how Google chooses a canonical
- Search Console Help: URL Inspection tool - the user-declared and Google-selected canonical fields