Canonical URLs

Canonical URLs

Managing duplicate content by declaring the main URL

Using canonical URLs for technical SEO

How canonical URLs work

When multiple URLs exist for a single piece of content, the canonical URL is the definitive web address you want to be visited and indexed by bots and visitors looking for the content. A canonical URL is the one that should be considered to be the original, or the “canon”.

Other URLs for this content might exist because your website creates them automatically. For example, some CMSs will automatically create an ID-based slug for your page, in addition to the carefully-chosen slug you enter.

Or they might exist because you’ve intentionally created different versions of your page that contain the same content, such a mobile version or a printable version or even a version with a parameter-based filter or sort, each with its own web address.

You might also syndicate your content in order to boost its reach; it might appear on Medium or other sites that publish collections of articles.

All of these non-canonical pages should include code in their HTML <head> section that references the canonical URL of the content. This takes the following form:

<link rel="canonical" href="">

This doesn’t send traffic to the canonical URL, but it does tell search engines that the content should probably be indexed at the canonical URL, not at the page where it was found.

Addressing duplicate content issues with canonicals

In technical SEO, rel=canonical declarations are used to resolve duplicate content issues that arise when two identical or nearly identical pages “cannibalize” each other’s search performance, or when Google picks the wrong page to show in search results.

While canonicals are considered to be hints and not directives by Google, they are generally honored if done correctly. However, if Google discovers problems with your canonical declarations, Google may generalize the questionable quality of your canonicals to all of your website, whether you deserve it or not.

Canonical tag best practices are fairly straightforward, but can get tricky on complex websites:

  • Always choose a canonical URL that contains the same content as the non-canonical URLs. (Don’t canonicalize a URL to the homepage, to a category page, or to an archive page.)
  • Include a self-referencing canonical tag on the canonical page. It’s recommended, but not required, to add
    <link rel="canonical" href="">

    even on the /your-canonical-page/ page.

  • Make sure all pages with the same content declare the same, single URL as their canonical URL.
  • Pay attention to canonical declarations when using hreflang declarations on translated or international content: for Page A, the hreflang declaration should point to the translation of the page version (Page A in another language); the canonical should always point to the main URL for that content in the same language.
  • Use the URL Inspector in Google Search Console to check the canonical URL that Google uses for a given page.

Tutorials and guides about Canonical URLs

Troubleshoot your canonical issues and put an end to duplicate content errors.

[Tutorial] Canonical URLs

How to use rel=canonical? Best practices for canonicals

[Tutorial] How does OnCrawl’s Duplicate Content Cluster Map work?

How we detect duplicate blocks of text inside your pages and across your site, what we show in the cluster map, and how to read it.

[Tutorial] Duplicate content

How to deal with duplicate content? Best practices to duplicate content

[Tutorial] Why is my crawl blocked at one URL / Why won't my crawl start?

Your crawl won't start or is stuck after one or two URLs. That's no good! Here are some of the most common issues and how to fix them.

[Tutorial] Why does my report only contain one URL?

What to do if your crawl results yield an analysis with only one URL.

FAQ about Canonical URLs

Can a page have multiple canonical URLs?
No: a page can only have one canonical URL. By definition, a canonical URL is the one URL to be indexed and taken as definitive for content that might appear on multiple pages.
Can the canonical URL be on a different site?
Yes, a page's canonical URL can be anywhere on the web: on the same site, on a different subdomain, or even on a different domain or site.
Do I have to declare a page as its own canonical URL (self canonical)?
Declaring a self-referencing canonical, that is, tagging a canonical page with its own URL, is a best practice, but not required.
How can I set a canonical URL?
You can set a canonical URL by adding <link rel="canonical" href=""> in the <head> section of a page's HTML. There are many plugins and scripts that will do this for you.
What is a canonical URL?
Canonical URLs are the main URL or address of content that might appear at different locations, whether intentionally or not.
Why are canonical URLs important?
Canonical URLs are a main strategy for managing duplicate content.
Why is Google ignoring my canonical URL?
Google considers rel=canonical tags to be hints. If pages on your site indicate canonical URLs that do not display the same content, or other issues with canonicals, Google may refuse to take into account other canonical URLs on the same site.

OnCrawl and Canonical URLs

Everything you need to know about canonical URLs on your own website: visualize groups of pages with similar content and find errors and omissions in your canonical strategy.

Discover canonical insights with OnCrawl's SEO Crawler