How Canonical tag works
Duplicate URLs are more common than most site owners expect: http and https, with and without www, trailing slashes, tracking parameters, sort orders, print versions, and the same product listed under several categories. The canonical tag sits in the page head, or in an HTTP header for files such as PDFs, and points to the URL you want indexed. A self-referencing canonical on every indexable page is a sensible default.
Google chooses its own canonical from several signals, including redirects, the canonical tag, internal links, sitemap entries and a preference for https. If these disagree, for example the tag names one URL while internal links and the sitemap point to another, Google may pick a different one. The URL Inspection tool in Search Console shows both the declared canonical and the one Google selected.
Common mistakes include pointing every paginated page to page one, which can hide deeper items; canonicalising to a URL that redirects or returns an error; pairing a canonical with noindex, which sends mixed signals; and a template bug that outputs the homepage as the canonical on every page, which can drop whole sections from the index.
How to improve it
- 01Add a self-referencing, absolute canonical URL to every indexable page.
- 02Point duplicates and parameter variants at the clean version, and confirm the target returns a 200 status and is indexable.
- 03Align signals so internal links, sitemap entries and redirects all use the canonical URL.
- 04Recheck templates after every theme, plugin or framework update, since one bug can repeat across thousands of pages.
- 05Use URL Inspection in Search Console to compare your declared canonical with the one Google chose.
A fictional furniture shop lists each sofa under living room, sale and new arrivals, creating three URLs per product. It sets the canonical on all three to a single product URL without a category path, lists only that URL in its sitemap, and updates internal links to match.