Explore What a Canonical URL Is and When You Need to Use It

page_watches 42849 page_stars
img-border Canonical URL Tag checking

At the moment, eliminating the problem of duplicate pages is one of the most important when optimizing the site. In most cases, to solve this problem, it is best to use 301 redirect.
But, when we either can not use 301 redirects, or we need pages for viewing by users, then the rel=”canonical” attribute comes to our rescue.

With this attribute, you can quickly resolve duplicate content problems.


Table of contents



How to register rel=”canonical”?


On the site page (main way)

To specify the canonical link for the current page, in thesection, you need to state the following: It is very important to register in the HEAD section, since if you accidentally register this attribute not in this section, this instruction will be ignored by the search engines.

<link rel="canonical" href="http://site.com/canonical-link.html"/>


Via xml-site map

For each page in the xml-map of the site you can register its canonical link. But, in this case, search engines can ignore these recommendations.


Through the server’s response (best for non-html documents)

If you need to specify canonical links for non-html documents, for example, for pdf-files, then you can specify a canonical link in the http-header. For this, the server, when requesting a duplicate file, must give the following

Link: <http://site.com/main-file.pdf>; rel="canonical".

But, keep in mind that at the moment Google supports this element of the header only for Web search.


When to use canonical references?


If you know exactly in which case you have duplicates on your site

If you clearly understand the reason for the appearance of similar or very similar pages on your website and, at the same time, each such page should exist on the site, it is desirable to determine which of these pages of the series is the main one and from all other pages put the canonical links to this one main .


When it is difficult or impossible to implement 301 redirects

In general, it is best to use 301 redirects, but if it is quite difficult or long to implement, then you can use the attribute rel = “canonical”. According to Google, we pass the weight through canonical links absolutely identical to the weight, which transfers 301 redirects.


Multiple pages for one product series

If you have a series of products in the online store, which differs, for example, only in color, then it is better to choose one product as the main (typical) and put on it canonical links from other products.


For different sorts of goods in the catalog

If on your website the goods can be sorted in different ways and the sort parameter is specified in the URL:


then, it is necessary, from all different combinations of sortings, to put the canonical links to the catalog with the default sorting. Usually, this is a URL category without parameters, which are responsible for sorting the goods:

<link rel="canonical" href="http://site.com/dresses.html" />


When creating a catalog page with all products

According to Google’s recommendations (https://support.google.com/webmasters/answer/1663744?hl=en), the way in which you make a canonical link from all pages of the catalog to a page with all products / articles is optimal for indexing as site directory pages, and all products / articles on the site. With this method, for each section of the site you need to create a page “View all” and from each page of the pagination put a canonical link to the page “View all”.


Print page

If the printing of pages on the site is realized through an additional parameter, for example,


then, it is necessary, put the canonical link to the main version of the page

<link rel="canonical" href="http://site.com/news-1.html" />


When using the affiliate program on your website

If on your site there is an affiliate system or any other referral system, then it is very important to remember to prescribe the canonical links for all the pages that can be affiliate links. If you forget to post, then very quickly may appear in the index of search pages dozens, or even hundreds of duplicate pages of the site, because by external links, the search robots quickly index the necessary pages.

Therefore, for all pages on which are affiliate links


we prescribe the following instruction:

<link rel="canonical" href="http://site.com/dresses.html" />

In addition, you can tell Google all the parameters you do not need to be indexed via URL Parameters (in the Google Webmasters section Scanning). In this case, you must specify the partner parameter, such that it does not change the contents of the page.


To glue the directory index file

It is important to check that the files in the directory type index.html do not lead to duplicates: this can happen when two such addresses are available for indexing http://site.com/dresses/ and http://site.com/dresses/index. html. In such cases, to solve this problem, it is easiest to register such a canonical link in the http://site.com/dresses/index.html file

<link rel="canonical" href="http://site.com/dresses/" />


When using the same content on different domains or different language versions

When you create similar sites or make different language versions of your content, but at the same time use the same content on different sites / language versions, then you need to use rel=”canonical” on the main version of the content.


The main mistakes when using rel=”canonical”


Use on pages of pagination

Very often, with pagination or with some series of pages on the site for all pages of this series, the canonical first page is prescribed. This is incorrect, because it makes it impossible to index all the pages of the series.


The canonical reference is not indexable

If we put a canonical link to another page, we must make sure that this page is indexable:


Several links rel=canonical from one page

For one page there should be one canonical page. If several pages are specified, then only the first instruction will be taken into account.


Different canonical URLs

Be sure to always specify the same canonical pages for different implementations (for example, through the xml-map of the site and through rel=”canonical” on the page itself).


Incorrect use of relative links

In the general case, when specifying the canonical references, it is always desirable to prescribe absolute references

<link rel="canonical" href="http://site.com/dresses.html" />

since when you specify relative references, there is a very high probability of making an error:

<link rel="canonical" href="site.com/dresses.html" />

Then the search engines will simply ignore these instructions.

1 Star2 Stars3 Stars4 Stars5 Stars (10 votes, average: 4.70 out of 5)

Interesting now

How to Use Meta Robots Tag Correctly?

Meta robots tags are used to pass instructions to search engines on how they should index or crawl sections of a website. This article gives an overview of the different values that can be used in a

What Is JSON-LD Markup and Why Is It Better than Schema Markup?

If you understand how to use schema.org, but do not dare to mark pages up because of the complexity of the process, this article is for you. There is an effective and easy-to-use alternative - the

Causes of Duplicate Content and How to Solve the Problem

All search engines, including Google, have problems with duplicate content. When the same content is shown at numerous locations on the internet, a search engine can’t determine which URL should be

The Comprehensive Technical SEO Checklist

All the painstaking site optimization work can be crossed out by technical mistakes that will interfere with: the project's ability to be fully indexed, the search robot's ability to understand the

What Is a Top-Level Domain?

If you have purchased your domain or are using web hosting, you’re likely to have a top-level domain. This article looks at domain name hierarchy, the purpose of top-level domains and some of the

What Is the Root of a Domain Name?

Root domain - the domain of the highest level in any domain name system. The root domain of the Internet (sometimes called the zero-level domain) is serviced by the root servers of the domain name

Show more


The password link was sent to you by email

The password changed