1. canonical URL, or rel canonical link - what is it?
2 Why are canonical links important from a Google and SEO point of view?
3 How do I set up a canonical link on my site?
4 Canonical link - application
4.1 Versions of the website with http and https and www and without www
4.2 Sorting of products within a category
Canonical links have been around since 2009 - more than a decade. That's when Google, Microsoft and Yahoo came together to create them. Why? To provide site owners with a way to quickly and easily resolve duplicate content issues. Does it work? Yes... but only if you know how to use canonical links. Read in this article what a canonical rel actually is, when, how and where it should be placed.
Canonical URL, or rel canonical link - what is it?
Link canonical (otherwise tag rel canonical or rel-canonical) is the meta tag, which is located in the section of the website. It lets Google's robots know that an address url contained in the meta tag is the canonical (i.e. original) address and should be indexed. In other words, if you have the same or similar content available at different addresses URL, you can use canonical tags to determine which version should be indexed.
See below for a sample rel canonical tag:
<link rel="canonical" href="https://www.przyklad.com" />
As you can see, the idea is simple. If a page has several versions of the same content, you choose one 'canonical' version and direct search engines to it. This solves the problem of duplicate content when search engines don't know which version to display in the results.
Why are canonical links important from a Google and SEO point of view?
You surely already know that Google does not like duplicate content. It makes it difficult for robots to decide which version of a page to index and which one to display for related queries. Besides, the search engine wastes valuable resources on scanning the same content over and over again. Too much duplicate content negatively affects crawl budget, or your site's indexing budget. This means that Google may waste unnecessary time indexing multiple versions of the same page, rather than discovering other important content on your sites.
Of course, the use of canonical links is not required, but they are of great importance for positioning. Not only do they reduce the number of duplicates. They allow Google's robots to find valuable links on a page more quickly, and the authority of a page, which is gained through inbound links, is not dispersed among several addresses.
You already know the benefits of canonical links, but it is also worth knowing that in many situations they are not a necessity. First of all, there is no need to include them if your website does not have duplicate web addresses in terms of content. In this case, the canonical URLs do not need to be on each of the pages you want to show in the search engine. Google's robots will find them anyway! A second situation in which canonical links are not needed is as follows having a robots.txt file. It contains addresses that you do not want to show in the search results.
How do you set up a canonical link on your site?
You need to know that an incorrectly implemented canonical link will not work - it will be ignored by Google. So read now how to set up a canonical correctly on your site.
The way in which canonical tags are added to pages will depend entirely on the type of site you have.
If you have a WordPress-based site, implementation is particularly simple. You can use one of these plugins:
Yoast SEO - just enter the editor, go to Advanced, enter the address in the box Canonical URL and save the page.
Also, if the website is not based on a popular CMS, the use of canonical links is straightforward as it comes down to adding a single line of code in the header of the page. See below where in the document HTML this element should be located.

Remember! The canonical link should be inserted into pages that have identical content to the primary (original) page.
Canonical link - application
You already know what they are and how to add canonical links to a website. Now it's time to find out when it's worth using them.
Versions of the website with http and https and www and without www
When a page is available under different versions of addresses, e.g. with http and https or with www and without www - we are dealing with internal duplication. Each of these versions is a separate subpage for Google. To avoid duplication, apply 301 redirect or use just rel canonical to indicate the correct URLto show up in search results.
Attention! You may wish to use 301 redirects and canonical links at the same time to help the robots interpret the situation appropriately.
Sorting of products within a category
Internal duplication is a problem that large websites and online shops are particularly prone to. Sorting on product pages is obviously a convenience for internet users, but a challenge for SEO. When products are sorted, the url of the page changes, but the content does not. Therefore, for Google, this is a duplication. In this situation, a canonical link should be used that points to the category homepage.
Duplicate descriptions of similar products
Another challenge that online shops face is the need to create unique descriptions. Sometimes, however, products differ only slightly, e.g. in colour or size. When the owner is not able to create/provide separate descriptions for each product (which is the best solution from an SEO point of view), it is worth using a canonical link. In this way, you will lead robots to a single page with the product description. This is a compromise that has its drawbacks, but solves the problem of duplication.

Canonical links are a powerful tool
Especially for larger sites, the process of setting up canonical links can be crucial. If you follow best practice, you will optimise your site for Google's robots and lead to improved results SEO. You will reduce repetitive content and bots will find valuable (original) links faster. This will increase the position of the page in search results.