A canonical URL is a way to tell search engines about the website’s specified URL. It can be the main URL of a website or page. If you use a canonical URL on your website you can easily prevent by the confusion of duplicate content. Search engine bot takes a URL of a website or page as many websites. Collectively, the canonical URL is used to inform search engines on what URL it has to show in SERPs. In this article, we will tell you all about canonical URL for beginners and exports you can also read other SEO tips to boosting your site traffic and generate lead. 

What is a canonical URL?


The main problem is that users can come on your website or page by different URLs the example of that is a blow. That thing can make confusion in Google algorithms. Google considers it as the duplication of content but it is a single website or page which can be accessed by different URLs format. Google goes to de-rank websites having copy content. So, as we know now different versions of URLs of a website create confusion for Google that’s why they need for canonical is felt.

rel canonical pages works

Google find difficulties to select:

What URL is to rank in SERPs. The search engine cannot understand that all the URLs indicate only one website.

For example,

a single page can be accessed by different URLs.

  • http://www.qasimagha.com 
  • https://www. qasimagha.com 
  • https://qasimagha.com 
  • qasimagha.com
  • http://qasimagha.com
  • http://qasimagha.com/index.php

Why Canonical URLs are important?

As we see these are five different types of URLs but they point to the same website. Because the user and access it by any method but Search engine bot do not take them as a single website. Search engine bots think these are different websites that have the same content. So, you have to tell that these different URLs are the same and pointing a single website. 

canonical URL help bots

The canonical URLs are introduced to solve all these issues. They help to tell Search engine bots they all are URLs are the same and which one is your main URL. If the owner of the website does not define a canonical URL and don’t tell about the main URL of the website or page and others are the clones on that URL, the Search engine bots itself will define that URL.

Here are some points for describing the importance of the Canonical URL:

  1. Tell Google about your Main URL
  2. Tell Google about which version of your page URL want to index
  3. Tell Google about which URL you want to Show rank in SERPs for relevant queries.

What is the syntax of code adding the Canonical URL?

There is a simple syntax of canonical :  

<link rel=” canonical” href=”http://qasimagha.com/index.php”>

This tag contains two parts

  • In firs, part link rel=” canonical” that tell the bots to link in this tag is the leading (canonical) all the other clone versions of that page.
  • In the Second part href=”http://qasimagha.com/index.php”> you give your website the main URL.

How to set Canonical URLs:

There are 4 different methods for implementing canonical URL

  • Use rel=”canonical” link tag
  • Use rel=”canonical” HTTP header
  • Use a sitemap
  • Use 301 redirects for retired URLs

Use rel=”canonical” link tag

The most in use method for add canonical URL is to add Link canonical tag.

How to add canonical URL using Canonical tag

  • Firstly, you should have the authority to access the header of your website.
  • Then you need to decide what URL has more preference for you.
  • Set that URL as your main version. According to Google, you select that format of your URL is https://www.qasimagha.com
  • Add that URL in the canonical tag

 <link rel=” canonical” href=”https://www.qasimagha.com” />

  • Past that tag in the header section between


<link rel=”canonical” href=”https://www.qasimagha.com” />


Here is https://www.qasimagha.com is the main link on which you want Search engine bot’s attention.

In case you are not about to set canonical tags manually, many plugins are available. If your website is Word Press based you can install plugins. But if you need to go straight you can follow this process. 

Use the rel=”canonical” link tag for mobile screen

If you want to add that canonical tag for mobile you need to add some changes in your tag replace the rel=” canonical” into rel=” alternative”.

<link rel=”alternate” media=”only screen and (max-width: 640px)”  href=”http://m.www.qasimagha.com/ “>

Use rel=”canonical” HTTP header

There are many other types of content that can be available on your site which has no header but can be accessed by different URLs. What you do then to solve the duplication issues?

To solve that issue google introduces another method for add canonical is configure your server for add canonical for non-header files.

How can add canonical URL using HTTP header 

  • Add HTTP header canonical is very easy
  • Go to your site header
  • Select the document URL


  • Add that URL in the link

Link: <http://www.example.com/downloads/white-paper.pdf>; rel=”canonical”

  • Past that between the header


Link: <http://www.example.com/downloads/white-paper.pdf>; rel=”canonical”


Note: If you have more then one non-header documents on your site you add all the links like that  

Do you think that is a long process?

For solve that long process here is another method

Past that code between <head>  </head>

<File “file.pdf”>

Header add link “<http://www.qasimagha.com/ >; rel=”canonical””


This code tells the search engines bots that all the PDF files on the website have canonical

But in this method, you cannot tell that which one is your main URL Google can automatically select any of them.

Use a sitemap

Add you canonical URLs in the sitemaps are very easy methods for big websites. That is the simplest method to add canonical and tell Search engines about your main URLs.

How to add canonical URLs using sitemaps?

  1. Create a Sitemap
  2. Add all the canonical URLs in that sitemap
  3. Upload that site map on you site server
  4. Submit sitemap in webmaster tools

Use 301 redirects for retired URLs

This is another method to tell search engines bots about single page can be accessed by different URLs

For example

  • https://qasimagha.com/home
  • https://home. qasimagha.com
  • https://www. qasimagha.com

We know that these are the different URLs of the same page or the same site. You can use the 301 radiation for transform traffic of different URLs to a specific URL  

Pons and Cons of different methods of implementing Canonical URL:

Here is the complete Google table about the pons and cons of there methods 

Method Description
General guidelines Follow these guidelines for all canonicalization methods.
rel=canonical <link> tag Add a <link> tag in the code for all duplicate pages, pointing to the canonical page.


  • Can map an infinite number of duplicate pages.


  • It can add to the size of the page.
  • It can be complex to maintain the mapping on larger sites or sites where the URLs change often.
  • That only works for HTML pages, not for files such as PDF. In such cases, you can use the rel=canonical HTTP header.
rel=canonical HTTP header Send a rel=canonical header in your page response.


  • It doesn’t increase the page size.
  • Can map an infinite number of duplicate pages.


  • It can be complex to maintain the mapping on larger sites or sites where the URLs change often.
Sitemap Specify your canonical pages in a sitemap.


  • Easy to do and maintain, especially on large sites.


  • Googlebot still must determine the associated duplicate for any canonicals that you declare in the sitemap.
  • Less powerful signal to Googlebot than the rel=canonical mapping technique.
301 redirect Use 301 redirects to tell Googlebot that a redirected URL is a better version than a given URL. Use this only when deprecating a duplicate page.
AMP variant If one of your variants is an AMP page, you will need to follow the AMP guidelines to indicate the canonical page and AMP variant.



Hence, I read many reports on the internet, according to my analysis it has been proved that canonical URL is mandatory to add. You can avoid any future problems regarding URLs by selecting these tags in the website or page.




Write A Comment

Pin It