Canonical Tags SEO: The Ultimate Guide to Canonical URLs

Canonical tags have been introduced since 2009. Thought it is nothing new, many SEO beginners still don’t know what canonical tags are, and how to use them to improve SEO.

In this guide, you will learn what a canonical tag is, when it should be used, how to use canonical tags correctly and common mistakes you need to avoid.

Let’s dive in.

Part 1: What Is Canonical URL?

The canonical tag is the HTML element we use to let Google know that 2 or more URLs on our website are duplicate, similar, or identical. It can be seen in the source of a webpage, by searching for rel=”canonical”. Here is an example.

Canonical URL Example

Although their meaning is not the same, the following terms are often used to refer to the canonical URL: canonical tag, canonical link, rel canonical or rel=”canonical”. 

Canonical URL vs. Canonicalised URL

  • The canonical URL is the primary version of your content. It is the URL that you want to appear in Google’s search results.
  • A canonicalised URL is a page with a canonical tag and a different URL inside its canonical tag (the canonical URL).

By including a different URL in the canonical tag on a page, you are instructing Google to index the canonical URL instead of the page’s URL.

When page A has a canonical link element referencing page B, you say that page A has been canonicalized.

Canonicalization is the process in which a preferred version of a page is selected over multiple other versions.

Part 2: Do Canonical Tags Affect SEO?

Yes. Canonical tags affect SEO from two points of view. 

Canonical URLs Specify the URL that Should Be Shown in Search Results

Duplicated pages are created on our websites easily even before we realized it. Actually, several things can lead to duplicate pages with different URLs:

  • the HTTP and the HTTPS version of a page
  • the www and the non-www version of a page
  • index and default pages (index.htm, index.php, /)
  • pages with and without trailing slashes
  • URL parameters that do not change the content
  • URLs with session IDs
  • faceted website navigation (the same content can be found in two different categories)
  • alternate page versions (regular, mobile, print, etc.)

Although there is no duplicate content penalty, search engines might pick the wrong version for the search results which may harm conversion rates by not showing content in its best possible state.

In this case, the canonical tag enables you to show search engines the preferred version of the page.

Important note: Google states that they usually respect the canonical URL you set, but not always. That’s because canonicals tags are hints not directives.

rel="canonical"

Canonical URLs Consolidate Link Signals Across Duplicate or Near-Identical Pages

When you have duplicate or near-identical pages on your site, there is a chance that the individual URLs could earn links from external sources. 

Use canonical URLs to consolidate the link signals from multiple pages into a single URL that you specify. In this way, canonical tags pass link equity to the authoritative page. Also, similar or duplicate content across websites won’t have to compete for traffic/ranking in search engines any more.

Part 3: When Should You Use Canonical URLs?

Now we know the importance of canonical URLs for SEO. Then, when should we use canonical URLs?

Here are a few scenarios where webmasters can use canonicalization to guide search engines and improve their chances of being ranked higher.

1.      Common Duplication of Content on Your Site

Common cases in which canonical URLs fix duplicate content issues are:

  • When query parameters are used in the URL.
  • When pages are slightly different, commonly referred to as near duplicates.
  • When intentionally multiple versions of a page were created.

2.      Specify a Canonical Page When Using Hreflang Tags

Specify a canonical page in same language, or the best possible substitute language if a canonical doesn’t exist for the same language.

3.      Ecommerce Sites Using Multiple URL Variations

Ecommerce sites often set separate hierarchies and URLs for their product range and change them often as per the need. Sizes, colors, and add-on items may all have distinctive URLs. Also, one item may be listed in multiple categories or areas of an online store. Canonical tags can be used to direct search engines to the preferred pages.

4.      Repost Existing Content

If you have a website that is a part of a franchise or national organization, then you may share statements, press releases, and even blog content originally published on the main national website. Instead of merely linking to the original content and hoping site visitors click through, you may publish the content on your own site. This is duplicate content that needs a canonical tag. You can use a canonical URL to direct search crawlers to the original post so that it doesn’t look like you are copying the page.

5.      Syndicating Blog Content

Blog content syndication helps marketers boost brand awareness and offers quality content to publishing websites. However, since syndicated content is spread across various websites, it can be tough for Google or any other search engine to determine the original content source. By deploying canonical tags, webmasters can easily share high-quality content without having to worry about their SEO performance.

6.      A/B Testing Webpages

Most digital marketers use A/B testing to assess the usability of a website. While doing so, the search engine crawlers may crawl both the pages, leading to confusion. Using canonical tags can help in such cases.

Part 4: How to Add Canonical Tags?

Canonicals are easy to implement. We’ll discuss 3 different ways to add canonical tags.

Method 1: Implement a rel=”canonical” Directly Via HTML

The most common way to implement a canonical is by placing a link element with the attribute rel=”canonical” and the absolute path to the canonical version within the <head> of each URL. Here’s the correct syntax: <link rel=”canonical” href=”https://seoasoorm.com/seo-friendly-url/” />

Then, how to implement the canonical tags in multiple duplicated pages correctly? Let’s say we have three duplicated pages – Page A, Page B and Page C, and we decide to choose Page A as the preferred page.

Page A: https://example.com/page-a

Page B: https://example.com/page-b

Page C: https://example.com/page-c

In this case, we add the same <link rel=”canonical” href=” https://example.com/page-a /” /> to Page A, Page B and Page C.

Method 2: Setting Canonicals in Sitemaps

Google states that non-canonical pages shouldn’t be included in sitemaps. Only canonical URLs should be listed. That’s because Google sees the pages listed in a sitemap as suggested canonicals.

“We don’t guarantee that we’ll consider the sitemap URLs to be canonical, but it is a simple way of defining canonicals for a large site, and sitemaps are a useful way to tell Google which pages you consider most important on your site.”

So, don’t include non-canonical pages in a sitemap. If using a sitemap, specify only canonical URLs in the sitemap.

Method 3: Add Canonical URLs Using Yoast

Yoast SEO is one of the most popular SEO plugins for WordPress, and it is a simple and easy tool for adding canonical tags.

By default, Yoast will add a self-referencing canonical URL. If you want, you can specify a custom canonical URL for your page. 

Part 5: How to Avoid Common URL Canonicalization Mistakes?

Canonicals tags, although in your complete control, are a branch of technical SEO and are rather hard to deal with in certain situations. Canonicalization mistakes can lead to display issues in the search engines and, obviously, lower rankings. Worst part is that, most of the time, the errors pass unnoticed for a very long time.

Read the following tips to avoid common URL canonicalization mistakes.

Tips #1. Don’t Just Delete Non-Canonical Versions ?‍

When we found duplicated content, some of us sometimes may have the inclination of wanting to “clean up” and delete or remove the duplicated pages and leave the preferred page.

The problem with this is that sometimes that content has been linked to or referenced in other places. If you delete these pages, your visitors will no longer be able to access it via internal or external links they have gained.

If you have to delete pages, you’d better redirect them first.

Tips #2. Avoid Chain- Or Cross-Canonicalization

Make sure to canonicalize only one source of original content for multiple pages. Don’t canonicalize page A > page B and then page B > page A; or page A > page B > page C. Otherwise, search engines may opt for a wrong page. The correct canonicalization scheme is: page B > page A, page C > page A, page D > page A, etc. (given that A is canonical).

Tips #3. DON’T Self-Reference Mobile URL Versions with A Canonical Tag

One common mistake people do is self-referencing their mobile URL versions with a canonical tag. The correct way to do it is to add a canonical tag pointing from the mobile URL to the desktop URL and also have a rel-alternate tag that points from the desktop URL to the mobile URL.

If the canonical page has a mobile variant, add a rel=”alternate” link to it, pointing to the mobile version of the page:

<link rel=”alternate” media=”only screen and (max-width: 640px)” href=”http://m.example.com/page-1″> (pointing from desktop URL to mobile URL)

<link rel=”canonical” href=”http://www.example.com/page-1″> (pointing from mobile URL to desktop URL)

Tips #4. DON’T Set Multiple Canonical URLs

You should only use a single canonical tag, or specify a single canonical URL for each page, otherwise, it is likely that all will be ignored. 

Tips #5. DON’T Set the Canonicalized URL to ‘noindex’

Don’t use noindex as a means to prevent selection of a canonical page. This directive is intended to exclude the page from the index, not to manage the choice of a canonical page.

Tips #6. DON’T Canonicalize a Paginated Archive to Page 1.

The rel=canonical on page 2 should point to page 2. If you point it to page 1, search engines will actually not index the links on those deeper archive pages.

Tips #7. DON’T Use Rel=canonical in the <body>

Rel=canonical should only appear in the <head> of a document. A canonical tag in the <body> section of a page will be ignored.

Conclusion

A rel=canonical isn’t a mandatory search engine requirement, but from an SEO perspective it’s hugely important. Using canonical tags wisely can save you from troubles related to duplicate content. Also, it will benefit SEO ranking.  

Check your website and if there are duplicated content, follow the guide in this post to use URL canonicalization correctly.

Hopefully this helps you some. If I failed to mention anything of note, or if there is a topic you’d love to see covered in some detail on the blog, please feel free to let me know in the comments.