canonical tag

What is canonical tag? The best importance of canonical in SEO for 2023


The canonical tag has been here since 2009. Google, Microsoft, and Yahoo worked on it together. They wanted to help website owners fix problems with repeated content.

Now, does this tag help with making SEO better? Yes, but only if you use it right! In this article, we’re discussing the canonical tag.

What is canonical tag?

The canonical tag (also known as “rel=canonical”) is a small piece of code in a webpage that points to the main version of content when there are similar or almost identical pages.

This helps search engines like Google know which version to consider as the original. So, if you have content that’s the same but on different web addresses, you can use canonical tags to tell Google which one is the most important. This tag helps your website rank better on Google and is a big deal for SEO.

What does the canonical tag look like?

Canonical tags have a simple and continuous structure and are placed in the <head> section of the web page:

Here’s an example of what a canonical tag looks like:

<link rel= “canonical” href= “” />

Let’s break down the meaning of each part of this code:

  • “link rel= ‘canonical'”: This part of the tag shows the original version of the content.
  • “href= ‘'”: This is the web address where you can find the main version of the content.
canonical tag

Why are canonical tags important for SEO?

Google doesn’t like it when the same content is copied because it’s tough to decide which one to use:

  • Which version of the page should be chosen? (Only one can be chosen!)
  • Which version of the page is better for showing up higher on Google search?
  • Does the link combine the pages into one or split them into different versions?

Having too much-copied content can mess up the way Google explores websites. This means that Google might spend too much time looking at different versions of a page and ignore other important stuff on your website. Google’s pointless exploration of copied content needs to be stopped as much as possible.

Canonical tags fix all these issues. With these tags, you can tell Google which version of the page to use and rank and where to connect the link. If you don’t say which URL to use as canonical, Google will decide for you, and that’s not good because it might choose a page version you don’t want.

Remember: According to Google, they usually follow the main URL you set using canonical, but not always because canonical tags are just hints, not commands. Any hints like links should go along with the main URL as long as they’re not ignored. Using canonical tags correctly will stop Google from choosing the irrelevant page.

Do I have duplicate content?

If you haven’t posted the same thing more than once, you don’t need to worry about having the same content twice. But search engines look at crawl URLs, not the actual pages.

This means if you have a web page like and another one like, they’re seen as different pages even though they’re the same. These are called parameterized URLs.

For example, a store called Brown Bag Clothing sells shirts. The web address for their shirt page is:

When you use a filter for XL shirts, they add something to the address:

Then if you use a filter for blue shirts, they add something else:

Google thinks these are all different pages, even though they’re mostly the same. This happens to other websites too, not just stores. There are other reasons for having the same content on different websites too.

  • Making web addresses that change based on what you’re looking for, like
  • Using web addresses that include numbers to identify your visit, like
  • Having two versions of a page, one for reading online and one for printing, like and
  • Using special web addresses for posts in different groups, like and
  • Creating web pages that work well on different types of devices, like for regular devices and for mobile devices.
  • Making two versions of a page, one for quick loading (AMP) and one regular version, like and
  • Making your website accessible with and without “www” in the address, like both and
  • Making your website work with both secure (https) and non-secure (http) connections, like and
  • Making your website content accessible whether there’s a / at the end of the address or not, like and
  • Making your website content accessible regardless of whether the letters are capitalized in the address, like and
canonical tag

Issues related to duplicate content in different domains are also problematic. If you’re linking and distributing content, it’s best to use a self-referencing canonical tag in the article and let linked content with a cross-domain canonical tag identify you as the original. 

This won’t always prevent linked content from appearing in search results, but it will greatly prevent it from outranking and ranking better than the original content.

Canonical tag application principles

Canonical tags are easy to use. In this article, we discuss four different ways to implement them, but in choosing each method, there are five golden rules that should be considered.

Rule 1: Use absolute URLs

A person named John Mueller from the Google team mentioned that it’s better to avoid using short paths with a specific type of link called “canonical.” He suggested that using complete web addresses (URLs) is a good idea to make sure they are understood correctly. He wrote this advice in a message on October 24, 2018.

So, you should use this format:

<link rel=”canonical” href=”” />

Instead of this format:

<link rel=”canonical” href=”/sample-page/” />

Rule 2: use lowercase letters in URLs

Since Google may treat lowercase and uppercase URLs as two separate URLs, you should enter the lowercase URLs on your server and then use them for canonical tags.

Rule 3: Use the correct version of the domain (HTTPS or HTTP). 

If you’ve switched to SSL, be careful not to use a non-SSL address (e.g., HTTP) in your canonical tags as this will cause confusion and display irrelevant results. If you are on a secure domain, be sure to use the following version of the URL:

<link rel= “canonical” href= “” />

And not this:

<link rel= “canonical” href= “” />

Note: If you are not using HTTPS, the opposite is true.

Rule 4: use self-referencing canonical tags

John Muller says that you don’t have to, but it’s a good idea to use canonical tags that refer back to your own page. He suggests, “I think it’s best to use these tags to show us which page you want people to find and how the web address will look after they find it.” Even if you only have one page, there are different kinds of web addresses that can help your page, like having extra details at the end, maybe in lowercase or uppercase letters, with or without “www”. You can describe all of this with a simple special tag called a canonical tag.

If you still don’t know how exactly a self-referencing canonical tag works, it’s basically a canonical tag on a page that refers to itself. For example, if the URL is, a self-referencing canonical tag could look like this:

<link rel= “canonical” href= “” />

Most popular and modern CMSs automatically add self-referencing URLs, but if you’re using a custom CMS, you’ll need to ask your developer to hardcode it.

Rule 5: Use a canonical tag for each page

If a page has multiple canonical tags, Google will ignore them all. In the case of multiple rel=canonical, Google ignores all rel=canonical signs.

canonical tag

How to implement canonical

There are several common methods for determining canonical URLs. The known canonical signals are:

  • HTML tag (rel=canonical)
  • HTTP header
  • Sitemap
  • Redirect 301
  • Internal links

Canonical setting with HTML tags (rel=”canonical”)

The rel=canonical tag helps you show the main URL for a page. To do this, you can put a simple code in the <head> part of the duplicate pages. This method stands out as the easiest and most straightforward technique.

<link rel= “canonical” href= “” />

For example, suppose you have a t-shirt store website. You want to be your canonical URL, although the content of that page can be accessed through other URLs (e.g.,

Add the following canonical tag to each duplicate page:

<link rel= “canonical” href= “” />

Note that if you’re using a CMS, you don’t need to mess with your page code.

To set the canonical tag in WordPress, install Yoast SEO so that self-referencing canonical tags are added automatically. For personalized settings, use the Advanced section of each post or page.

Setting canonicals in the HTTP header

For documents like PDF, the canonical tag cannot be placed in the page header because there is no page <head> section. In this situation, you should use HTTP headers to set the canonical. You can use canonical HTTP headers on standard web pages.

Canonical setting in sitemap

According to Google, non-canonical pages should not be included in the sitemap and only canonical URLs should be listed, because Google sees the pages listed in the sitemap as recommended standards. However, URLs in the sitemap are not always chosen as standard and canonical.

Google writes: We do not guarantee that all URLs in the sitemap are considered canonical, but this is a simple and practical way to determine the canonicals for a large site, and sitemaps help Google a lot in recognizing important pages on your site.

Canonical setup with redirection 301

Use 301 redirects to direct traffic from the duplicate URL to the canonical version.

For example, suppose that your page is accessible through these URLs:


Choose one URL as canonical and redirect all other URLs to it.

You should do the same for the secure HTTPS/HTTP and www/non-www versions of your site. Specify a canonical version and direct the rest to that version. For example, the canonical version of is a URL without www and with HTTPS ( All the following URLs redirect to this version:


Internal links

How you link from one page to another on your site is a canonical signal. John Mueller once explained the signals used to determine canonical URLs in a video. The more consistent you are in using signals, the better and easier it will be for search engines to identify your preferred URL. As Muller points out, Google prefers HTTPS over HTTP.

Common mistakes in the canonical tag

Canonical is a more or less complicated subject. For this reason, there are many misunderstandings and misconceptions about the correct way of canonicalization. In this section, we want to address some of these mistakes.

Mistake #01: blocking the canonical URL with robots.Txt

Blocking the URL in robots.txt prevents Google from crawling and in other words, Google does not see the canonical tags of the page. This in turn prevents link alignment from a non-canonical page to a canonical page.

Mistake #02: setting the canonical URL as noindex

Never use noindex and rel=canonical together because their directives conflict with each other. Google usually prefers the canonical tag over the noindex tag, but it is better not to mix these two tags together. If you want to use both together, choose the 301-redirect method. Otherwise, use rel=canonical.

Mistake #03: setting 4XX HTTP status code for canonical URL

Setting the 4XX HTTP code status for a canonical URL has the same effect as the noindex tag, so Google cannot recognize the canonical tag and transfer the link alignment to the canonical version.

Mistake #04: Using the canonical tag for paginated sections

The pages in the pagination should not be referred to the first page of the pagination. Instead, self-referencing canonical tags should be used on all pages in the layout. Why? According to John Muller, using rel=canonical is incorrect.

“Don’t use rel=canonical on the second page talking about the first page. They’re not the same,” he explains. Also, use rel=prev/next tags for organizing pages. Google doesn’t use these tags, but Bing still does.

Mistake #05: not using conventional tags with hreflang

The use of hreflang tags is to determine the language and geographic target of a web page. According to Google, set the canonical page to the same language you want, or if the canonical tag doesn’t exist in that language, replace it with a language that closely resembles it.

Mistake #06: Having multiple rel=canonical tags

If you put many “rel=canonical” tags, Google will ignore them. This often occurs because tags are added to the system from various sources like CMS, plugins, and themes. That’s why many plugins have a choice to be the only source for canonical tags.

Another area where this can be problematic is with canonical tags added to JavaScript. If you have a URL without a canonical tag in the HTML response and then add a rel=canonical tag with JavaScript, there will be no problem in displaying the page from Google. However, if you have a URL specified with a canonical tag and replace this preferred version with JavaScript, you are actually confusing Google.

Mistake #07: rel=canonical in <body>

rel=canonical should only appear in <head>. The canonical tag added in <body> is actually ignored.

This becomes a problem during analysis. A page’s source code may have the rel=canonical tag in the correct place, but when the page is rendered in a browser or rendered by a search engine, various things, including unclosed tags, injected JavaScript, or <iframes> in the section <head> cause <head> to have an incomplete ending. In this situation, a canonical tag may accidentally be placed in the <body> section of the presented page and eventually be ignored.


Until now, we’ve discovered why the canonical tag matters in SEO! The canonical tags aren’t very complex; it’s normal if you’re a bit puzzled at the start. Remember, these tags don’t give orders, but they send a message to search engines. To see the canonical tags chosen by users and Google, you can use the URL Inspection tool in Google Search Console. We wish this article helped you.

If you seek further information about the What is canonical tag? The best importance of canonical in SEO for 2023 or have any inquiries regarding our blog, please don’t hesitate to contact us via email at

Share This Article :

Leave a Comment

What to read next