A canonical tag, commonly known as rel=”canonical”, is an HTML element used to signal to search engines the preferred version of a page when multiple pages have identical or highly similar content.
Here’s how it looks in code:
<link rel="canonical" href="https://example.com/preferred-page/" />
This tag tells search engines, “This is the primary version of this page. Please prioritize it for indexing and ranking.”
Canonical tags solve one of SEO’s biggest headaches: duplicate content. When multiple URLs contain the same or almost the same content, search engines can get confused about which one to rank. The canonical tag eliminates that confusion by clearly pointing to the original.
There are four major reasons to use canonical tags:
Use canonical tags in any scenario where multiple URLs serve the same or substantially similar content. Common examples include:
Tracking URLs or filtered versions of pages often have parameters. For example:
https://example.com/shoes?color=black
https://example.com/shoes?utm_source=facebook
All of these should canonicalize to the clean version:
<link rel="canonical" href="https://example.com/shoes" />
If both protocol versions are still accessible, canonical to the HTTPS version:
<link rel="canonical" href="https://example.com" />
Pick one (typically www or non-www) and canonical all versions to it.
Pages with user-specific session parameters should canonicalize to the clean, static version that doesn’t include dynamic identifiers.
If you have separate versions for print or mobile, use canonical tags to steer search engines to the primary version.
If you have a multi-page article or forum thread, you can canonical each paginated version to the main page—but only if the content is very similar. Otherwise, use rel="prev"
and rel="next"
for pagination.
Getting canonicalization right is more than just adding a line of HTML. Here are best practices to ensure your canonical tags work as expected:
Canonical tags must include absolute URLs—not relative ones. For example:
🚫 <link rel="canonical" href="/page" />
✅ <link rel="canonical" href="https://example.com/page" />
Every canonical URL should include a canonical tag that points to itself. This reinforces to search engines that the page is the preferred version.
<link rel="canonical" href="https://example.com/page" />
on https://example.com/page
Don’t canonical Page A to B and then B to C. Or worse—bring it full circle back to A. This confuses crawlers and can hinder indexing.
Don’t canonicalize to a broken, non-indexable, or redirected page. Always verify that the canonical URL returns a 200 status code and is indexable by Google (i.e., no noindex directive, blocked by robots.txt, or canonicalized elsewhere).
Google recognizes several ways of defining canonicals: HTML tags, HTTP headers, sitemap annotations, and redirects. While it’s okay to use multiple methods, they must all be consistent. Don’t tell Google one URL is canonical via the tag, and another one via a redirect.
If you use hreflang for multilingual sites, never canonical all languages to one default version (e.g., English). Each language URL should canonicalize to itself.
Instead, use hreflang annotations like this:
<link rel="alternate" hreflang="en" href="https://example.com/en" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr" />
And self-canonicalize each version.
Avoid these pitfalls that could undermine your SEO efforts:
There are several ways to audit your canonical implementation:
Look for <link rel="canonical" href="..." />
in the page’s header.
Tools like Ayima Page Insights or SEO Meta in 1 Click show canonical tags instantly.
In the “URL Inspection” tool, scan the “Google-selected canonical” vs. “User-declared canonical.” If they differ, investigate why.
Crawlers like Screaming Frog or Sitebulb expose canonical relationships and help spot inconsistencies at scale.
A canonical tag is only a hint, not a directive. Google may choose to ignore it if it disagrees with your declared version. On the other hand, a 301 redirect is a directive—it moves both users and bots to a new URL and consolidates ranking signals more strongly.
Use a 301 redirect when:
Use a canonical tag when:
Canonical tags are essential for maintaining strong SEO, especially on large or dynamic websites where duplicate content naturally exists. Implementing them correctly ensures that Google understands your content structure, indexes the right pages, and transfers ranking power effectively.
Used right, canonical tags give you more control over which pages appear in search—and prevent your SEO efforts from being diluted across similar URLs.
Make them a routine part of your on-page SEO audits.