What Is a Canonical Tag and When to Use It
A canonical tag tells search engines which URL is the real one when several pages show the same content. Learn what it does and exactly when to use it.
A canonical tag is one line of HTML that tells search engines which URL is the real version of a page when the same content shows up at more than one address. It looks like <link rel="canonical" href="https://example.com/page" /> and sits in the <head>. Search engines then treat that URL as the master copy and fold the ranking signals from the duplicates into it, instead of splitting them across several near-identical pages.
What does a canonical tag actually do?
It solves duplicate content. When Google finds the same or very similar content at multiple URLs, it has to guess which one to rank. Guessing wrong means your links, your relevance, and your authority get scattered. The canonical tag removes the guess. You point every duplicate at one chosen URL, and that URL gets the credit.
It is a hint, not an order. Google usually respects it, but it can override a canonical if your signals contradict it. So the tag has to match reality: point it at a page that actually exists, returns a 200 status, and is not blocked by robots.txt.
When should you use a canonical tag?
Use one whenever the same content is reachable from more than one URL. The common cases:
- Tracking parameters.
/shoesand/shoes?utm_source=emailare the same page. Canonical both to/shoes. - Sort and filter URLs. Ecommerce and blog listings that spawn
?sort=priceor?page=2variants. - HTTP and HTTPS, www and non-www. Pick one and canonical the rest to it.
- Trailing slashes and casing.
/Aboutand/about/resolving to the same content. - Syndicated or reposted content. If another site republishes your article, ask them to canonical it back to your original.
- Print or AMP versions of the same article.
When should you NOT use one?
A canonical tag is not a redirect and not a way to hide pages. Skip it or use the right tool instead:
- Pages with genuinely different content should each be their own canonical. Do not point them at one another.
- To remove a page from search, use
noindex, not a canonical. - To move a page permanently, use a 301 redirect.
- Do not canonical paginated pages (page 2, 3, 4) to page 1. Let each page self-canonical.
How to set one up correctly
- Put the tag in the
<head>of the page, never in the<body>. - Use one canonical per page. Two canonical tags cancel each other out and Google ignores both.
- Use absolute URLs, not relative ones. Write the full
https://address. - Make every page point to itself when it has no duplicate. This is called a self-referencing canonical and it is good practice.
- Match your canonical to your sitemap, your internal links, and your redirects. Mixed signals confuse the crawler.
- Check that the target URL returns 200 and is indexable.
Why this matters for AI visibility too
AI answer engines like ChatGPT and Perplexity crawl the same web and hit the same duplication problems. If your best page is competing with three parameter-laden copies of itself, an AI model may cite the wrong URL, or a competitor's cleaner page instead. Clean canonicals help concentrate authority on the one page you want quoted. That is part of the wider answer engine optimization picture, and it pairs with checking your AI visibility directly.
The short version
A canonical tag names the master URL when content appears in more than one place. Use it for parameters, filters, protocol variants, and syndication. Do not use it as a redirect or a way to deindex. Keep it absolute, self-referencing by default, and consistent with the rest of your site. Get it right once and you stop leaking authority you already earned. From there, a quick free SEO audit will catch anything else holding the page back.