Link

canonical

Names the preferred URL for the current document. Search engines can use it to consolidate duplicate URLs and their signals.

Code examples

Good example
<link rel="canonical" href="https://www.example.com/products/widget">
Declares one absolute preferred URL for the current page.
Avoid this example
<link rel="canonical">
Has no href, so it does not identify a preferred URL.

Recommendations

  • 01
    Point to a usable page
    Use an absolute URL for a canonical page that returns a successful response and is eligible for indexing. Avoid redirects and error pages.
  • 02
    Keep signals consistent
    Use the same preferred URL in canonicals, internal links, redirects, and sitemaps. Conflicting signals can cause search engines to choose another URL.
  • 03
    Use one canonical
    Multiple canonical declarations can make the signal ambiguous. Emit one clear URL per page.

Related documentation