URL signals · 4 min read

Canonical URLs: choose one version for duplicate pages

A canonical is a preference signal for duplicate or very similar URLs. Use it to clarify equivalent versions, and keep redirects, internal links, and sitemaps consistent with that choice.

When a canonical helps

The same content can sometimes be reached through more than one URL: for example, a share link with tracking parameters or a legacy URL that still serves the same page. A canonical tells a search engine which equivalent URL you prefer to represent that content. Google describes rel="canonical" and redirects as strong signals, while sitemap inclusion is a weaker signal; it still chooses the canonical it considers best.

Place the preferred absolute URL in the HTML headhtml
<head>
  <link rel="canonical" href="https://example.com/guides/canonical-urls">
</head>

Point only between equivalent pages

Choose the URL that should remain available to users and search. The target should be the matching page, not simply the homepage or the nearest category. Do not canonicalize distinct products, language versions, or useful pages just because they share a template.

  • Use an absolute HTTPS URL, with the intended hostname, path, and trailing-slash form.
  • For duplicates you are retiring, use a permanent redirect when that change is appropriate. For duplicates that need to remain accessible, use a canonical link instead.
  • Point internal links and sitemap entries to the URL you prefer. Avoid sending conflicting preferences through the HTML, HTTP headers, redirects, or sitemap.
  • Do not use robots.txt to canonicalize a URL, and do not use noindex as a substitute for choosing the canonical within a set of duplicates.

Verify the declared and selected URLs

  • Open the response HTML and confirm there is one valid canonical link in the head, pointing to the intended absolute URL.
  • Fetch the target directly. Confirm it is the correct content and does not redirect back, error, or declare a conflicting canonical.
  • Compare the URL in internal links and the sitemap with the same preferred version.
  • Use Search Console URL Inspection to compare the user-declared canonical with the canonical Google selected, when that information is available.
Find canonical declarations in the returned HTMLshell
curl -sS https://example.com/guides/canonical-urls | grep -i canonical