Canonical tag
Definition: A canonical tag is a link element with rel=canonical that tells search engines which URL you consider the main version of a page when the same or very similar content is available at several URLs.
Also called: rel=canonical, canonical URL, canonicalization
Updated
A strong hint, not a command
Duplicate URLs are normal. The same product can be reached with tracking parameters, in several categories, over HTTP and HTTPS, or with and without a trailing slash. The canonical tag tells search engines which version you want to rank.
Google says rel="canonical" is a strong signal but not a directive. It weighs the tag alongside redirects, sitemap entries, internal links and HTTPS, and may choose a different canonical if those signals disagree (consolidate duplicate URLs). Search Console’s URL Inspection shows both your declared canonical and the one Google selected.
Example
<link rel="canonical" href="https://example.com/shoes/trail-runner">
Place it in the head of every version of the page, including the main version itself, as an absolute URL.
Mistakes we see often
- Pointing at a URL that redirects or returns 404. The canonical target should return 200 and be indexable.
- Canonicalizing every paginated page to page one, which hides the products or articles listed on later pages.
- Protocol or host mismatches, such as a canonical to
http://on an HTTPS site, or towwwwhen the site lives on the bare domain. - Conflicting signals: the canonical says A, the sitemap lists B and internal links point to C.
- Adding or changing the canonical with JavaScript, which crawlers that do not render scripts will never see. Keep it in the server-rendered HTML.
- Canonical plus
noindexon the same page, which sends contradictory instructions.
The canonical checker finds the canonical a page declares and tests whether the target resolves cleanly.