Skip to main content
SEO

Canonical URL

Published:
Updated:

A canonical URL is the preferred address for a page available at multiple URLs or a group of very similar pages. A rel="canonical" annotation in <head> or an HTTP Link header is a signal to search engines; Google may choose another URL.

Duplicates arise naturally: tracking parameters (?utm_...), trailing-slash variants, http/https, www/non-www, sorting variants in e-commerce. Without canonicalization, ranking signals (including links) are spread across several addresses, and the search engine picks the indexed version itself, not always the right one.

Best practices

  • Choose the preferred URL for each duplicate group; it may self-canonicalize, while variants should point to that same URL.
  • The canonical should be an absolute URL, consistent with the sitemap and internal linking.
  • Do not combine canonical with noindex on the same page, because these are conflicting signals.
  • Pagination and language variants are not duplicates, so do not canonicalize them to a single page.

Canonical is a hint, not a directive

Google treats rel="canonical" as a strong suggestion it may ignore if other signals (internal links, sitemap, redirects) point elsewhere. Consistency of all signals is a precondition for effective canonicalization.

Canonical versus a 301 redirect

A redirect and a canonical solve the same problem in two different ways. A 301 redirect takes the old address out of circulation: users and crawlers land on the new URL and the old one stops being reachable. A canonical leaves both addresses working and merely states which one is preferred.

Redirect a permanently retired old address. If a duplicate must remain accessible, declare a canonical. Google allows these methods to stack: an old URL redirect and a self-canonical on its destination can send consistent signals.

  • Permanent address change, domain move, http to https, www to non-www: use a 301 redirect.
  • A duplicate that must remain reachable at its own address: use a canonical.
  • Point a canonical directly at the final URL, without another redirect.

Canonical redirects and a canonical that points to a redirect

"Canonical redirect" is used for two different things. The first is a 301 redirect that sends every duplicate variant (http, www or a missing trailing slash) to the canonical URL. WordPress does this by default with its redirect_canonical() function, and most frameworks and CDNs have an equivalent setting. It is the strongest form of canonicalization, because the duplicate stops being reachable at all.

The second is an audit warning: "canonical points to redirect". The page declares a canonical URL that itself answers with a 3xx. The search engine then gets conflicting hints: the tag names URL B, the server says the content lives at URL C, and it may ignore the canonical. The usual causes are a canonical written with http or without the trailing slash, and a moved page whose old address templates still reference. The fix is to point the canonical straight at the final URL that returns 200.

A missing canonical tag

A missing canonical is not an error in itself. The search engine will pick a canonical version on its own, from internal links, the sitemap and redirects. The problem starts when its choice differs from yours and you have no way to say so.

A self-canonical makes sense on the preferred page. Do not automatically copy the full current URL with parameters: /product?utm_source=newsletter should point to /product when the content is the same.

The "Alternate page with proper canonical tag" status

In the Search Console indexing report this status means the page was not indexed because its own canonical points elsewhere, and the search engine honoured that.

It is not an error when the canonicalization was intentional. It is worth investigating only when URLs you meant to index separately show up on the list, which usually points at a template stamping one canonical across a whole section, or at language versions being canonicalized onto a single page.

Canonical, sitemap and robots.txt

Canonical identifies the preferred address, a sitemap helps discovery, and robots.txt controls crawler access to resources. None replaces the others: a sitemap URL should be canonical and return 200, while robots.txt should not block the page or resources needed to read its signals.

Example

Example: a campaign variant points to the preferred product page. A retired old URL may redirect there, and the product page may carry the self-canonical below. In URL Inspection, compare the user-declared canonical with the Google-selected canonical.

Tag in <head>
HTML
<link rel="canonical" href="https://example.com/products/mens-t-shirt">
Alternatively: HTTP header
HTTP
Link: <https://example.com/products/mens-t-shirt>; rel="canonical"

Sources & further reading

Check your site’s canonical signals

Insight analyses public SEO signals including canonicals, redirects, sitemap and internal links, then orders findings by priority.