Canonical tag
A canonical tag is a line of HTML that tells search engines which URL is the master version of a page when several addresses show the same or similar content. It consolidates ranking signals onto one URL instead of splitting them across duplicates.
In practice
Duplicate URLs happen without anyone deciding to create them. A product reachable at two paths, a page that loads with and without a trailing slash, a printable version, URLs carrying campaign tracking parameters: each is a separate address serving much the same content. Left alone, search engines have to guess which one to rank, and the signals that should have accumulated on one page get divided among several.
The tag itself is a single element in the page head naming the preferred URL. Point it at the version you want people to land on. A page can, and generally should, declare itself canonical, which sounds redundant but removes the ambiguity when tracking parameters get appended to the address.
It's a strong hint rather than a command, which is the part that catches people out. If your canonical tag points somewhere that contradicts the other signals on the site, such as your internal links, your XML sitemap, and your redirects, search engines may disregard it. The tag works when it agrees with everything else, not when it's used to overrule them.
Two mistakes are worth naming because they're both quiet and expensive. Pointing every page's canonical at the homepage, which effectively tells search engines the rest of your site isn't worth indexing. And leaving staging URLs in canonical tags after launch, so your live pages nominate a staging site nobody can reach as the master copy.
A quick check on any page: view source, search for "canonical", and read the URL it names. If it isn't the address you'd want someone to bookmark, that's the problem, and it's usually a template-level fix rather than a per-page one.
Common questions
What does a canonical tag do?
It names the master version of a page when the same content is reachable at more than one URL, so search engines consolidate ranking signals onto that one address instead of splitting them across duplicates.
Is a canonical tag the same as a 301 redirect?
No. A redirect physically sends visitors and crawlers to a different URL, so the original becomes unreachable. A canonical tag leaves both URLs working and expresses a preference about which one should rank. Use a redirect when a page has genuinely moved.
Should a page have a canonical tag pointing to itself?
Generally yes. A self-referencing canonical removes ambiguity when tracking parameters or alternate paths produce variant addresses for the same page.