What is the canonical tag in HTML and how do I use it?
Solved Email & Outlook
BA
Barry Allen
September 15, 2020
2 replies
9,840 views
Reviewed by moderators

I keep seeing the canonical tag mentioned for SEO and duplicate content, but I am not clear on exactly what it does or how to implement it correctly.

What is rel canonical actually for and what are the rules?

Accepted Answer
Verified by Edwin J. Hoffer, Email Systems Specialist ยท Reviewed September 2020

The canonical tag solves a specific problem, telling search engines which version of a page is the real one when several URLs show the same or similar content and the rules around it are where people slip, so what it does then how to use it right:

What it does: rel canonical is a link element in a page's head, link rel canonical href pointing at the preferred URL, that tells search engines this is the definitive version of this content, so when the same content is reachable at multiple URLs, with and without www, with tracking parameters, printer versions, the canonical consolidates their ranking signals onto the one preferred URL instead of splitting them or risking duplicate content treatment. It is a strong hint rather than an absolute directive, but search engines largely respect it.

The placement and format rules: the tag goes in the head, exactly one per page since multiple canonical tags confuse search engines into ignoring them all and the href should be an absolute URL, https and the full domain, not a relative path, since relative canonicals are a common mistake that misdirects. A page canonically pointing at itself, a self referencing canonical, is normal and recommended for your main pages, declaring each is its own canonical.

The common correct uses: a page with tracking parameters, example.com/page?utm=x, canonicals to the clean example.com/page consolidating the signals, duplicate content across URLs canonicals to the one true version and syndicated content canonicals back to the original source. The pattern is always pointing the duplicates at the one you want ranked.

The mistakes that break it: canonicalizing every page to the homepage, a serious error telling search engines your whole site is one page, relative rather than absolute URLs, canonical tags that conflict with redirects or noindex on the same page sending mixed signals and canonical chains where A points to B points to C rather than all pointing at the final target. Get the tag pointing at the genuine preferred absolute URL, one per page, consistent with your redirects and sitemap and it does its consolidating job well, which for a site with any URL variation is worth implementing deliberately rather than leaving to chance.

The exactly one per page, absolute URL, self referencing for main pages rules were exactly what I was unsure about. Found I had a couple of pages with relative canonicals and one accidentally pointing at the homepage, both fixed. The consolidate signals onto one URL purpose finally makes the whole thing make sense.