Rel="canonical" is an attribute that helps search engines identify the main version of a page among similar content. Correct use of this tag allows you to avoid Yandex and Google sanctions for duplicating information, correctly distributes link weight and improves site indexing.
In this article, we'll tell you how canonical works, where and when to use it, and what mistakes to avoid.
What is rel="canonical"
Rel="canonical" is an HTML attribute that specifies the canonical version of a page. Essentially, it is a recommendation to search engines to consider the given URL as the main one when indexing and ranking.
Example of tag usage:
To understand what function the canonical tag performs, let's look at an example - an online cosmetics store that has many lipsticks of the same brand. They differ from each other only in color.
A separate page is created for each product. However, Yandex or Google robots may consider other URLs as duplicate content and lower the site's position. This will have a negative impact on the site's promotion and on the store's sales in general.
In this case, the canonical tag comes to the rescue. It helps to show search engines that they have another version of the page in front of them, and not its exact copy. Rel="canonical" points crawlers to the main URL that needs to be indexed.
However, it is worth understanding that the attribute is not directive, unlike australia whatsapp data the same robots.txt. This means that search engines perceive it as a signal, not as an instruction.
When I found out what Rel= is
*When I found out what Rel="canonical" is
Why use rel="canonical"?
Using the canonical attribute helps solve several important problems:
Avoid penalties for duplicate content. For example, if the same product is available through different URLs.
Save link weight. The weight of links from duplicate pages is transferred to the canonical one.
Optimize crawl budget. Bots will scan canonical links more often and save time on duplicate analysis.
Combine signals by links. Search engines take into account information from similar pages. This helps increase the value of the main one in their eyes.
Simplifying indexing. The search engine sees the priority URL and displays it in the search results.
For example, the same content is available at several addresses:
When to use rel="canonical"
Duplicate pages
Duplicates may occur due to:
Filters and sorting of goods.
URL parameters (e.g. UTM tags).
Different categories for one product.
Pagination pages
If the site has pagination, each page should either point to itself or to "Show All" if such a page is available.
Different versions of the site
When you hesitate and don’t know which version of the site to consider the main one
*When you hesitate and don’t know which version of the site to consider the main one
Mobile and desktop versions
If a mobile version is used, for example, m.site.ru, it should point to the desktop version via canonical. And the desktop version should point to the mobile version via rel="alternate".
Regional and language versions
For sites with multiple regional versions in one language, you must specify the canonical one. For resources in different languages, the hreflang tag is used.
Using the rel="canonical" tag, you can tell search engines which page to consider the main one.
How to set up rel="canonical" correctly
To set up a canonical attribute, you need to select the main page, enter its URL in rel="canonical" and add this tag to other pages.
Through the < head > section in HTML
You need to add a tag to the < head > section of each non-canonical page:
In the HTTP header
For PDF files, the canonical URL is configured via server headers:
With the help of CMS
On popular CMS, you can use plugins. For WordPress, Yoast SEO is suitable, where canonical is configured automatically. By the way, we have already talked about other extensions for this CMS in the blog.
Via Sitemap
All links that are in the XML map are considered canonical by default by search engines. Therefore, it is worth adding only the main versions of the pages there.
Common mistakes when setting up canonical
Beginner SEO specialists often make mistakes when working with the canonical attribute. Below we describe the most popular of them:
Multiple canonical links on one page. In this case, the search engine may completely ignore the attribute. It is worth specifying only one canonical URL.
Canonical URL stringing. If the page you set as canonical has a canonical tag pointing to another page, the bot will ignore that attribute. For example, A -> B -> C.
Closing the canonical page from indexing. If the main page is unavailable, the tag will not work.
Using the first pagination page as canonical for all. This prevents other pages from being indexed.
Specifying a canonical tag instead of a redirect. Canonical does not redirect users to the correct version of the page, but only signals bots.
Rel canonical attribute: how to use it correctly and what is it for in SEO
-
- Posts: 596
- Joined: Mon Dec 23, 2024 5:54 am