dev-tools

Canonical URL

The canonical URL is the address you nominate as the single real version of a page when several addresses serve the same or nearly the same content. It is declared with a rel="canonical" link in the document head, or an HTTP header for files that have no head, and it asks the engine to index that address and consolidate the ranking signals of the duplicates onto it. Duplicates appear without anybody deciding to create them. Campaign and tracking parameters, http alongside https, www alongside the bare domain, trailing slashes, uppercase paths, print views, session identifiers, sort orders and filter combinations all produce distinct addresses for one page. Left alone, each variant collects a share of the links and attention that should have accrued to one URL. A canonical is a hint and not a directive, and forgetting that is the source of most surprises. The engine weighs it against the other evidence — internal links, redirects, which URL appears in the sitemap, hreflang annotations, which version people actually link to — and is free to choose differently when those disagree. What makes the hint hold is consistency across all of them rather than the tag on its own. The recurring failures are worth memorising. A template bug that canonicalises every page to the homepage, which removes a site from the index far faster than anyone expects to find it. Canonicals pointing at URLs that redirect, 404, or carry noindex. Paginated listings all canonicalising to page one, which quietly hides everything past the first screen of results. Self-referencing canonicals on every page are the ordinary default and cost nothing: they settle the parameterised variants automatically without anyone maintaining a list. And a canonical is not a redirect — a person following a link to the duplicate still lands on the duplicate, so if the goal is that nobody sees the other address, you want a redirect instead.

Related terms

More Dev Tools terms