Canonical tag
A canonical tag is a line of code in a page's head that tells search engines which URL is the main version when several URLs show the same content. If your pricing page loads at /pricing and at /pricing?ref=nav, the canonical tag on both points to /pricing.
What is a canonical tag?
A canonical tag is one line in a page's HTML head that tells search engines which URL is the main version of that page. It's a link element with rel="canonical" and the full address of the page you want indexed. Search engines use it when the same content loads at more than one URL.
Let's say you sell payroll software. Your pricing page loads at /pricing. It also loads at /pricing?ref=nav when someone clicks the menu, at /pricing?utm_source=linkedin when someone clicks your LinkedIn ad and at a www and a non-www version. To Google, that can look like five pages with the same content. A canonical tag on each one that points to the clean /pricing URL tells Google which one to show.
The tag is a strong hint. Google weighs it along with your redirects, internal links and sitemap, and it can still pick a different URL if those signals disagree.
Why canonical tags matter for B2B SaaS
SaaS sites create duplicate URLs all the time, mostly by accident. Campaign links add UTM parameters, integration directories add filter and sort parameters, docs keep old versions live and landing page tools publish copies of pages. Without clear canonicals, Google picks the main version for you.
Google's guide to consolidating duplicate URLs lists redirects and rel="canonical" as strong signals and sitemap inclusion as a weaker one. It also says to put the tag in the head and to use full URLs.
Here's why canonicals deserve a check on every SaaS site:
- They keep link value in one place: If one blog links to /pricing and another links to /pricing?ref=partner, the canonical helps Google count both toward the same page.
- They keep the right URL in results: Buyers should land on your clean pricing page. A URL with a campaign tag in results also muddles your analytics.
- They save crawling on big sites: Docs, integration pages and programmatic pages can create thousands of near-copies. Clear canonicals help Google spend its crawl budget on the pages that matter.
How to set canonical tags
Most of this is set once in your CMS template and then checked after every big site change. Here's my process:
- Add a self-referencing canonical to every indexable page: Each page should point to its own clean URL. Google recommends this, and it protects the page from every tracking link anyone creates later.
- Use full URLs: Write the complete address with https and your chosen domain. Relative paths work, but Google advises against them because they break easily.
- Put it in the HTML head: Google only reads the canonical in the head. If your site adds it with JavaScript, make sure it's also in the HTML the server sends.
- Point to a live, indexable page: The target should return a 200 status, have no noindex tag and not redirect anywhere. A canonical to a broken page confuses every signal.
- Make your other signals agree: Internal links, the sitemap and redirects should all use the same URL as the canonical. When they disagree, Google often goes with them instead.
- Use the right tool for the job: Google says not to use robots.txt or noindex to pick a canonical. Use a 301 redirect when the old URL shouldn't exist at all.
For content you syndicate to other sites, Google changed its advice in 2023. It no longer recommends a cross-domain canonical for syndicated copies and suggests partners use noindex instead.
A canonical tag example
Here's how the payroll software site from earlier could set its canonicals. The site is hypothetical, and the choices follow Google's published guidance:
| URL | What it is | What to do |
|---|---|---|
| /pricing | The main pricing page | Canonical to itself |
| /pricing?utm_source=linkedin | Pricing page with a campaign tag | Canonical to /pricing |
| /integrations?sort=popular | Integration list in a different order | Canonical to /integrations |
| /docs/v2/api-keys | Old docs version with the same content as v3 | Canonical to /docs/v3/api-keys, or redirect if v2 is retired |
| /blog?page=2 | Second page of the blog archive | Canonical to itself, since it lists different posts |
| http://payroll-example.com/pricing | Old non-https version | 301 redirect to the https URL |
The last two rows are where teams slip most. Paginated pages show different content, so Google advises against pointing them all at page one. And an old http version should redirect, since nobody needs to reach it.
How to measure canonical tags
You can't see canonicals by looking at a page, so check them with tools. Here's what I'd look at:
- Page indexing report: In Search Console, look for "Duplicate, Google chose different canonical than user". Each URL there is a place where Google disagreed with your tag.
- URL Inspection: Check your key pages, like pricing and top comparison pages. It shows the canonical you declared next to the one Google selected.
- A site crawl: Run Screaming Frog or a similar crawler and filter for missing canonicals, canonicals that point to redirects or 404s and canonicals to noindex pages.
- Which URL ranks: For your most important keywords, check that the clean URL ranks and not a parameter version. A tagged URL in results means the signals aren't lined up.
Our SEO audit checklist puts these checks next to the rest of a technical SEO review.
Common canonical tag mistakes
- Pointing every page to the homepage: A template bug that sets the homepage as every page's canonical can drop the rest of the site from results. Check a few page types after any template change.
- Copying one canonical across a whole section: A blog template that points every post to /blog/ tells Google the posts are copies of the archive.
- Canonicals to pages that redirect or 404: Google can't use a target that doesn't load. Update canonicals whenever you move or delete pages.
- Mixed signals: A canonical to /pricing while the sitemap lists /pricing?ref=nav gives Google two answers. Make every signal point the same way.
- Using canonicals to fix cannibalization: Two different articles competing for one keyword aren't duplicates. Merge them or make them answer different questions, as covered under keyword cannibalization.
Here's a quick first check. Run your pricing page through URL Inspection in Search Console. Does the Google-selected canonical match the one you declared?
Read more
FAQ
What does a canonical tag do?
It tells search engines which URL is the main version of a page when the same content loads at several URLs. Google then tends to show that URL in results and count links to the copies toward it.
Does Google always follow the canonical tag?
No. Google treats it as a strong signal and can still pick a different URL, for example when internal links or the sitemap point somewhere else. URL Inspection in Search Console shows which URL Google chose.
Should every page have a self-referencing canonical?
Yes, Google recommends it. A canonical that points to the page's own clean URL protects it from copies created by tracking parameters and other URL variations.
What's the difference between a canonical tag and a 301 redirect?
A 301 redirect sends people and crawlers to another URL, so the old one stops showing content. A canonical tag leaves both URLs working and asks search engines to treat one as the main version.


