A canonical URL is a page on the site that is considered the main page among all its duplicates. The site owner chooses which version of the page is considered canonical to tell the search bot that it should be indexed and that other versions should be disregarded. To select a canonical URL, the site owner must specify the rel="canonical" tag in the HEAD section of the HTML code of the page. If you do not do this, the search engine itself will decide which URL to consider as canonical. It is also possible that the system will consider several canonical URLs, and then it will lead to negative consequences for the site.
Canonical URLs are very important to write for multipage sites, where there may be pages that lead to several different addresses at once, or where there are pages with small differences. For example, in the online store, you can get to the product page with different combinations of filters, which will change the final URL. On the product page itself, you can switch product modifications, e.g. change the color of a t-shirt. The content of the pages will be almost the same, so you need to specify which of these versions is considered canonical.
The canonical URL performs several functions at once:
- helps to get the necessary pages indexed;
- allows you to select the page the site owner wants to display in organic search;
- сontributes to SEO-promotion;
- facilitates the collection of statistics for the pages of the site.
After selecting the canonical URL, the search bot will scan duplicate pages much less frequently and they will not be ranked by the search engine. The search bot will be easier to understand what page is the most relevant of all and index it. The rel="canonical" tag is not necessarily used only for pages that have complete duplicates. Even if the content of the pages is slightly different, it is recommended to specify the canonical URL to avoid confusion.
In order to find out which pages of the site are considered canonical — you can use Google Search Console. Even if the owner did not put the rel="canonical" tag, the search engine can choose canonical URLs on its own. It may also choose a canonical page at its discretion, even if the tag is for a different URL. rel="canonical" is just one of the markers that signals to the search bot about the canonical URL. In addition, the system takes into account the protocol, the page content and the presence of the address in the sitemap.