Glossaryby Mark

What Is a Canonical URL and How to Use It Correctly

What a canonical URL (rel=canonical) is, how it prevents duplicate content problems, when to use it instead of a 301 redirect and common mistakes.

The same product page can open as /shoes, as /shoes?color=red and as /shoes?utm_source=newsletter. To a person it is one page, and to a search engine it is three addresses competing with each other.

Below you will see what a canonical URL is, how it is declared and when to use it.

Article summary
  • ✓A canonical URL is the address you declare as the main one for a piece of content.
  • ✓It is set with the rel=canonical tag in the page head.
  • ✓Google treats it as a hint and not as an order.
  • ✓It stops parameter variants from competing with each other.
  • ✓Every page should have a canonical pointing to itself.

What is a canonical URL?

A canonical URL is the address declared as the main one when the same content, or a very similar one, is reachable from several URLs. It is set with the link rel="canonical" tag in the page head, or with an HTTP header.

With it, the site tells Google which version it prefers to be indexed and to which one it should attribute the signals of the others. Google treats it as a hint and may choose another if it finds the signal contradicts what it sees, such as internal links pointing to a different version.

When is a canonical URL used?

The usual cases are variants of the same page by parameters (filters, campaign tracking, sorting), versions with and without a trailing slash or with and without www, syndicated content republished on another site and very similar pages from product variants. In the last case, the variants can point to a main page.

One example is a store with /shirts?size=m and /shirts?size=l. Both show almost the same content, and a canonical to /shirts concentrates signals on a single URL. It also pays for each page to point a canonical to itself, which protects against parameters added without your knowledge.

Common mistakes with the canonical

Canonical to a different page

Pointing to different content leads Google to ignore or deindex yours.

Mixed signals

A canonical to one version and internal links or sitemap to another create conflict.

Canonical on noindex pages

The two instructions contradict each other and the result is unpredictable.

Canonical chains

A points to B and B points to C. Each page must signal the final version.

When to use a canonical and when a 301 redirect?

Use a canonical when both URLs must stay reachable for people, like a page with filter parameters or a syndicated version. The person still sees them and the search engine understands which one is the main one.

Use a 301 redirect when the old URL should no longer be used: a slug change, a migration or the merging of two pages. The redirect sends people and crawlers to the new address, while the canonical only suggests a preference.

Next step

The next step is to crawl your site with a tool like Screaming Frog or Search Console's URL inspection and check three things: that each important page has its own canonical, that parameters point to the clean version and that no noindex page carries a canonical to another.

Related terms: Indexation, 301 Redirect, Content Cannibalization.

Frequently asked questions

Does Google always respect the canonical?

No. It treats it as a hint and may choose another URL if other signals, like internal links or redirects, point elsewhere.

Does a canonical pass link value?

Google consolidates the variants' signals into the canonical URL, though without the strength of a 301 redirect.

Should I put a canonical on every page?

It is good practice for each page to have a canonical pointing to itself, and for variants to point to the main version.

How do I see which canonical Google chose?

In Search Console, the URL inspection tool shows the user-declared canonical and the one Google selected.

Published:
MARK

Ready for MARK to write your next articles?

Set it up in minutes. Researched, optimized for SEO and GEO, and published straight to your CMS.