WordPress SEO in 5 Minutes – What is a Canonical URL
What is a Canonical URL?
It is an HTML element used to inform the search engines that the URL tagged by it is the master copy of the page. The attribute rel= “canonical” known as a canonical tag, is used to label this URL. In simple words, if you have different versions of the same content, the canonical tag notifies the search engine that the version tagged should be the one to appear in SERPs.
Importance of canonical URL
- Canonical URL help to specify which URL you want users to see in search results.
Let’s say you have two URLs for your product, and you prefer one over the other. You want search engines to show that URL in search results. Canonical URL will keep things clean for you.
- Canonical URL consolidates link signals for similar or identical pages and help to improve the SEO of your website.
Choosing appropriate canonical URL for every set of similar URLs helps search engines to consolidate the information they have for the individual ones into a single authoritative URL. This helps to improve SEO and rank better, by preventing the search engines getting confused with duplicate URLs.
- They help to keep tracking metrics simplified and organised for a single content.
When there are several URLs for a single content (like a product or a service), consolidation metrics for a specific product become difficult. This can be solved by canonisation.
To set a canonical URL
Let us understand this with the help of an example. The URLs given below are the URLs of two versions of the same page. The two pages contain the same content, and the only difference is they are in a separate section of your website. They both consist of backlinks, so they both are valuable.
First version: https://codesquad.cloud/wordpress/seo-mistakes-to-avoid/
Second version: https://codesquad.cloud/wordpress/mistakes/avoid/seo/
To apply the canonical tag to a URL
- Choose the page which you think is more valuable as the version.
- Add a canonical tag (rel= “canonical”) from the non-canonical page to the canonical one.
If you chose the first URL as your canonical URL, the second URL would link to the first one in thesection of the page as shown below.
This process merges the pages to a single one for the search engines crawlers. Now links to both URLs will be read as the canonical version of the URL.
Why not just delete a duplicate content?
That is a simple solution – if you do not need the second page. In the above example, both pages have backlinks and so are valuable. Similarly, in an e-commerce site, you may have products with multiple URLs due to the different paths they come from. In such scenarios, canonical URLs helps to solve duplicate issues.
URL – Uniform Resource Locator. A web address to direct a browser to a specific page. It is displayed in the address bar of a browser.
Backlinks – links from other websites to your page.
HTML tag – a set of characters in a particular format to form a command for a web page. It is hidden, that is, a user will not see the tag when they look at a web page.