AIO Copilot

What is a canonical URL?

A canonical URL is the address search engines treat as the main version of a page that exists at several URLs. Sites suggest it with a rel=canonical tag, redirects or sitemaps; Google makes the final choice.

The same content often sits at more than one address: with and without www, over HTTP and HTTPS, with sorting or tracking parameters, or as separate mobile and desktop pages. Google calls picking one representative URL from such a set canonicalization. Its explainer says Google groups duplicates into a cluster and selects the most representative page as canonical. The canonical is crawled most regularly while duplicates are crawled less often, Google uses it as the main source to evaluate content and quality, and a search result usually points to it.

Duplicates of this kind are normal, and Google says some duplicate content on a site is not a violation of its spam policies. The canonical decides which URL gets evaluated and shown, which is why sites state a preference. Our technical SEO audit checklist includes the canonical checks to run across a whole site.

How do you set a canonical URL?

Google's guide to specifying a canonical URL lists three methods by strength:

  • a redirect from the duplicate to the preferred URL, a strong signal, for duplicates you can retire
  • a rel="canonical" link element in the page's head, or a rel="canonical" HTTP header for non-HTML files such as PDFs, also a strong signal
  • listing only the preferred URL in your sitemap, a weak signal

The same guide sets the ground rules. Use absolute URLs in the canonical element. Put a canonical link on the canonical page itself. Link internally to the canonical rather than to a duplicate. Don't name different canonicals for the same page with different methods. Don't use robots.txt or the URL removal tool for canonicalization, and don't use noindex to steer the choice within a site.

Why does Google choose a different canonical?

Because a canonical preference is, in Google's own words, a hint, not a rule. Google weighs it against other signals, including whether each version is served over HTTPS, redirects and sitemap inclusion. Its troubleshooting guide lists the usual reasons it overrides a site: pages too similar to split apart, regional versions without hreflang, a CMS emitting wrong canonical tags or redirects, a misconfigured server, hacked pages, and syndicated or copied content. It adds that Google might hold pages in a duplicate cluster for up to two weeks even after you fix them.

How do you check a page's canonical?

Use the URL Inspection tool in Search Console. Its help page describes two fields: the user-declared canonical, which is what your page asks for, and the Google-selected canonical, which is what Google chose. When the two differ, the Page indexing report lists the page under "Duplicate, Google chose different canonical than user". To check the tag before Google sees it, paste a page's source into the free canonical tag checker, which flags missing or duplicate tags, relative URLs, HTTP versus HTTPS mismatches and a tag placed outside the head.

What canonical mistakes cause the most trouble?

The damaging ones send contradictory signals or point at the wrong page:

  • every page on a site canonicalized to the homepage
  • a canonical pointing at a URL that redirects, returns 404 or is marked noindex
  • two canonical tags on one page, for example one from the CMS and one from a plugin
  • every page of a paginated series canonicalized to page one, which Google's pagination guidance tells sites not to do, since each page should have its own canonical
  • canonicals pointing to HTTP addresses on a site that redirects to HTTPS
  • JavaScript that changes the canonical element after the page loads, which Google's guide warns against