Author: , CTO at Seonate

Updated:

In short

A canonical URL is the address you point search engines to as the right one when the same content is available at several addresses.

You may also meet the name canonical tag or rel=canonical.

Where repeated addresses come from

One page should have one address. In practice it often opens at several. For example with “www” and without, if the site does not redirect to one version. Or with an extra added by sorting or by an ad campaign. To you it is one page, to a search engine several different ones.

Online stores have the biggest problem, because one product can sit in several categories and variants. The same shoes may have the addresses /men/running-shoes/model-x, /sale/model-x and /new/model-x. The canonical on each of them should point to the same single address, for example /running-shoes/model-x.

ExampleThe canonical URL check of the home page in the Seonate panel
The “Technical health” view in the Seonate panel. The check of whether the canonical is set correctly.

What a canonical does

It is one line in the page's code, in the head section. It points to the right address.

<link rel="canonical" href="https://yoursite.com/running-shoes/model-x">

A search engine then knows which version to show in the results. Everything it knows about the page is assigned to one address instead of several copies.

To a search engine a canonical is a strong signal, but not an instruction. Google also takes into account redirects and which addresses are in the sitemap.1 If they point to a different address, a search engine may choose that one. That is also why links on your site should lead to the right address, not to a copy.

Canonical versus a 301 redirect

A 301 redirect moves both the person and the bot to the new address. The old address no longer holds content; the server sends visitors on to the new one.

A canonical leaves all the addresses available and only points search engines to the right one. Use it when several versions have to work at the same time. That is the case with addresses carrying a campaign tag or sorting, and in a store where a product should stay visible at the address of each category.

Choose a redirect when the second address is no longer needed, for example after the address structure changes. Google recommends it when a copy is being retired and treats it as a strong signal.1

In a store with a product in several categories both routes are correct. A canonical is quicker to put in place, because the addresses stay as they are. One product address with a redirect tidies the store for good, but it requires changing the address structure.

Common canonical mistakes

These are the mistakes we meet most often. Each ends a little differently.

  • The canonical of every page leads to the home page, the one at /. Pages may then disappear from search results.
  • The canonical leads to an address that does not work. A search engine usually ignores such a hint and picks an address itself.
  • The canonical leads to a page set to noindex. A search engine gets two conflicting messages and the page may drop out of the results.
  • The site has no single agreed version of its address, and the canonical points to a different one than the site really runs on. For example the site opens at https without “www”, while the canonical gives the address with “www” or with http. A search engine then gets two different hints.
  • The canonical is built from the address someone opened the page at, including a campaign tag (?utm_source=newsletter) or a sort option (?sort=price). Each such version then points to itself as the right one, so a search engine gets several addresses for the same content and picks which one to show on its own.
  • A canonical with a filter is not always a mistake. A page with only black shoes can be built as a separate folder, for example /running-shoes/black, or as a parameter, for example ?color=black. Both ways are correct. If such a page should be in search results, because people search that way, it should point to itself, however its address is built. If it is just one of many views of the same category, the canonical should lead to the address without the filter.

Frequently asked questions

Should every page point to itself as canonical?

Yes, every page that should appear in the results. Google recommends a canonical that points to the page itself. Its copies, for example addresses with campaign tags, then point to it, and the search engine gets a clear hint about which address is the right one.

How do I check which address Google chose as canonical?

In Search Console enter the page's address in the inspection box at the top. The URL Inspection result shows the canonical you declared and the one Google selected.

In the page code

A canonical is a link element with rel="canonical", placed in the head section. This link type is defined by the HTML standard, and the details are described in RFC 6596 from 2012. The RFC allows a relative address,2 but Google recommends a full one, including https://.1

HTML Standard: link type canonical

From our practice

On sites we take over from someone else there is often no canonical at all. We recommend adding it right away. WordPress itself adds one on single posts, pages and products, but category pages and product lists in WooCommerce stay without it until you install an SEO plugin. The second common mistake is a canonical that copies extras from campaigns or sorting and so points to the wrong address. The third is the lack of one agreed version of the site. The site runs at https without “www”, while the canonical points to the version with “www” or with http. In one store the same product opened at a separate address in every category, at /men/running-shoes/model-x and at /sale/model-x. In this store, instead of a canonical, we recommended changing the address structure. A product now has one address without a category, /product/model-x, and the old addresses redirect to the new one.

Jerzy KoziełCEO at Seonate

Sources

  1. Google: how to specify a canonical URL
  2. RFC 6596: The Canonical Link Relation
The first plan for your site

See what's
worth improving.

Enter your site's address and get an action plan. 14-day money-back guarantee.