Blog » SEO - search engine promotion » Як правильно використовувати атрибут rel = "canonical" і налаштовувати пагінацію на сайті
атрибут rel=canonical

How to use the rel = "canonical" attribute correctly and set up pagination on the site

Perhaps every SEO specialist, both beginner and experienced, has heard about the rel canonical tool. The thing is that setting canonicity and pagination is an integral element of website search engine optimization. And it is carried out due to the correct setting of the canonical tag.

Since search engine algorithms are regularly updated, the recommendations for using the rel = "canonical" attribute and setting pagination have changed accordingly. In this article, we will look at what a canonical in SEO is, how and when it is used now, and what mistakes most often occur when working with this element of search engine optimization.

What is the rel = ”canonical” attribute and what is it used for?

Tag canonical in SEO optimization is used to prevent duplicate content. It is registered on any web page in the header of an online resource, among the tags ... Thanks to this, search bots perceive the page where rel = "canonical" is written as a priority, or, as SEO experts say, canonical. It is she who will be displayed in organic search results, and the link weight of the rest of the web pages with similar content will be transferred to her. Thus, by adding the canonical tag, you provide a canonical link, which will make the web page a priority for indexing. If the site has online pages with identical or similar content available at different URLs, and this is often found in online stores where product page pagination is implemented, the most optimal solution would be to implement rel = ”canonical”.

How to designate a canonical page by means of canonical?

тег каноникалThe most popular use case for the canonical is the one described above. On the web page you want to "run" into the index, between … the full url is written with tags, and thus the canonical link is indicated. It looks like this: . To reduce the likelihood of errors, it is recommended that you write absolute URLs after the attribute instead of relative URLs.

In addition, canonical URLs can be specified in the technical sitemap. True, the canonical attribute is in fact not a rule for search engines, but a recommendation. Therefore, if a website is written into an xml-map, search engine bots will most likely ignore it.

The third option is in HTTP headers. This method is suitable only in cases where you have access to server settings. Implementing it for HTML pages is not the best solution. On the other hand, specifying the canonicality of PDFs via the HTTP header is a good option: link ; rel = “canonical”.

Configuring canonicity by plugin. For the most popular CMS, plugins have long been developed that help to form the canonical url of any page. Let's say WordPress uses Yoast SEO for this. In Opencart, canonicity is indicated in the engine options, however, only for product cards in the SEO URL section. In Joomla version 3 and older, the canonical is enabled due to the SEF functionality.

Canonical URLs - When Should You Configure Them?

1. If it is necessary to prevent the occurrence of duplicates:

  • web pages with GET parameters in url,

  • UTM tags,

  • filtering pages,

  • caused by the specifics of the engine.

In such cases, the canonical SEO tag is added by specialists to all static pages of a web resource.

2. To eliminate duplicate content. It so happens that similar content is available for indexing at different URL addresses. As a rule, this "suffers" large online stores, which contain pages of products placed in several menus at the same time or serially similar, but differing in color, size, shape. To solve the problem, you need to place the canonical url on all pages of the same type on the key, priority web page for indexing.

3. When the site has pagination. In this case, you need to add “Show all” pages to the catalog, showing all the products of the section at once, blog articles, etc. If they are added to the website, then on each page of the pagination, SEO optimizers place the canonical URL on “Show all”.

Rules for the formation of canonical pages

When using the canonical tag, follow the recommendations below, and then your manipulations will benefit the site:

  • Avoid canonical url chains. The sequence when page 1 refers to a non-canonical page 2, and that points through the canonical to the third, is erroneous.

  • On a web page, regardless of its purpose, only 1 canonical URL is allowed.

  • The canonical url must point to a web page located on the same domain as the online resource.

  • The page designated canonical must be present on the site and return the server code 200.

  • When independently searching for canonical PS web pages, Google prefers options with the https protocol.

When does rel = ”canonical” not work?

This method will not bring the expected effect when applied to pages with clearly different content. In this case, the search engines will not follow the recommendation written in the canonical tag. Also, setting rel = "canonical" will not work when you need to glue pages with www and without, or http and https versions of an online site. For these cases, a page-by-page 301 redirect is used.

Checking canonical links and errors when working with rel = "canonical"

You can check the canonical setting using programs for SEO-audit of sites, for example, Screaming Frog. The interface of this software contains a separate section Canonical, which shows the number of pages with and without the canonical tag, as well as those that have canonical URL addresses.

Канонические URLWhat are the most common mistakes optimizers make when using rel = "canonical":

  • Specifying as a canonical link located on a subdomain or having a different domain name.

  • Using "canonical" from the pagination page to the 1st page of the catalog instead of "Show all".

  • Designation by a canonical URL that did not get into indexing, because it was closed by a file or a robots meta tag, or found itself outside the PS index for other reasons.

  • The presence of a 404 error in a canonical link, in other words, the canonical leads to a non-existent web page.

  • Using multiple rel = "canonical" attributes in the code of one page or specifying different canonical URLs.

Google recommends placing the canonical on itself on each page of the pagination, otherwise, if you specify the canonical 1st web page of a category or blog, the indexing of subsequent ones becomes impossible. When placing several canonical URLs in the page code, only the first one will be taken into account. As for injecting the attribute by different methods, for example, in an XML map and directly on a web page, you must specify the same canonical URL.

Canonical and "See All"

As we wrote above, one of the most popular and available options for setting up pagination in an online store is to generate the “Show all” page. It is created and then specified as canonical for the rest of the catalog. From an SEO point of view, pagination configured in this way is considered effective, since this method is recommended by Google, which means that it demonstrates the best result for promotion in this search engine. It is also believed that it is convenient for visitors to view all products on one page, although this does not always work. For a comfortable interaction of users with the site, a high speed of loading the “Show all” web page is required, no more than 3 seconds. Therefore, this method may not be suitable for online platforms with thousands of products. Also, with some site engines, the “Show All” web page can give errors, so you need to determine in advance whether it is possible to create such pages within the CMS you are using.

Summing up

As the practice and experience of SEO-optimizers show, the rel = ”canonical” attribute has established itself as a useful and effective tool for promoting web platforms in the search network. If used correctly, it can improve the quality of the work of specialists and speed up the indexing of the site, which will have a positive effect on the ranking of the promoted online resource.

Would you like to know if rel = ”canonical” is used correctly on your site? Order with us SEO site audit and get answers to your questions!

en_USEng