Canonical URL
What is Canonical URL?
Canonical URLs are used to avoid content that can be the same or repetitive. These URLs are the main version of a webpage that Google indexes for this purpose. Thus, they are also called the principal and primary versions of web pages. The uses of canonical URLs can be understood as follows:-
- Combining link equity into the main page by directing all link juices to the URL.
- Finds the site with the primary source that hosts the original content.
- Saves crawl resources and ignores duplicate content.
Let’s follow an example:-
- https://example.com/shoes
- https://example.com/shoes?color=blue
- https://example.com/shoes?sort=price
Suppose the first one is the main version of the webpage; you’d be choosing it as the canonical URL, and you have to add the code below, with which you can prioritise this page in the search results.
- <link rel=”canonical” href=”https://example.com/shoes” />