flashrank
Technical SEO

The Canonical Tag: What It Is and How to Use It

The canonical tag designates the version to prefer when several URLs show identical or very similar content.

· 1 min read

The same content is sometimes reachable from several addresses: with or without parameters, over http or https, with or without www. The canonical tag lets you tell Google which URL you want indexed and shown in results.

The syntax

It goes in the page's header (head):

<link rel="canonical" href="https://www.example.com/preferred-page/" />

A hint, not an order

Google treats the canonical as a strong recommendation, not an absolute directive. It takes other signals into account (redirects, internal links, sitemap, content) and may choose another URL if it judges your indication inconsistent.

When to use it

  • URL parameters: campaign tracking, sorting, filters that create variants of the same page.
  • Multiple site versions: http and https, www and non-www, with or without trailing slash.
  • Very similar product variants (color, size) sharing the same description.
  • Republished content on another site, where the original version should be preferred.
  • Printable or AMP versions pointing to the main version.

Canonical or 301 redirect?

  • Use a 301 redirect when the old URL should no longer be accessible to visitors.
  • Use a canonical when both URLs must remain accessible but only one should be indexed.

Best practices

  • Add a self-referencing canonical on every indexable page: it points to its own URL.
  • Use absolute, complete URLs.
  • Declare only one canonical per page, in the head.
  • Point to a page that returns 200 and is indexable.
  • Stay consistent with the sitemap and internal linking: they should use the same URL.

Common mistakes

  • Pointing to a redirected, error or noindex page.
  • Combining contradictory instructions, for example a canonical to another page and a noindex on the destination page.
  • Pointing all pages of a paginated series to the first page: the content of later pages would then be ignored.
  • Pointing all language versions to a single language, instead of using hreflang.
  • Using the canonical for genuinely different content.

Check the URL Google selected with Search Console's URL inspection tool: it shows the declared canonical and the one Google chose.

#canonical#canonical url#duplicate content#301 redirect#indexing
Check your site for free SEO audit, speed, security, E-E-A-T… results in seconds.
Run an SEO audit →