A canonical URL allows you to tell search engines that certain similar URLs are actually one and the same.
Before we jump into Canonical URL’s, you should understand that the concept and idea of using canonical URL’s is rather simple, but actually implementing them correctly can be quite complex and confusing. With that said, we’ll do our best to break it all down in a simplistic manner.
So what is a canonical element?
The rel=canonical element; sometimes referred to as the “canonical link” is an HTML element that prevents webmasters from having duplicate content issues. It solves duplicate content issues by giving a webmaster the option to set a specific page out of multiple pages which may have similar content as the default “canonical URL”. This duplicate content solving provides search engines with a version of whatever duplicate content you would prefer the search engine to index.
Correct example of utilizing rel=canonical
Let’s say you have two versions of identical content. The only difference between the two pages would be how the menu item highlight color is different or you don’t have a large page title for the mobile specific page. The pages are literally identical in terms of content, but you want a specific page to show for desktop only the other for mobile users only. But when a search engine comes to the pages it doesn’t know which page to show out of the two because both pages have identical content, and therefore you could get penalized by the search engine for duplicate content. For example; these are their two URL’s
This is where rel=canonical comes into play.
- Pick one of your two pages as the canonical version. Ideally it should be the page you think is the most important. If you’re not too phased which one is the canonical version, then just flip a coin, but you need to pick one.
- Add a rel=canonical link from the non-canonical page to the canonical one. So if you decided to choose the shortest URL as the canonical URL, the other URL would link to the shortest URL like the following:
- <link rel=”canonical” href=”http://example.com/wordpress/seo-plugin/”>
This essentially “merges” the two pages from the perspective of the search engine and treats it as a “soft redirect”.
You can read a complete guide on canonical URL’s HERE from the developers of the YOAST plugin which cover:
- What is the canonical link element?
- The SEO benefit of rel=canonical
- The process of canonicalization
- How to set canonical URLs
- Correct example of using rel=canonical
- Setting the canonical in Yoast SEO
- When should you use canonical URLs?
- 301 redirect or canonical?
- Should a page have a self-referencing canonical URL?
- Cross-domain canonical URLs
- Faulty canonical URLs: common issues
- rel=canonical and social networks
- Advanced uses of rel=canonical
- Canonical link HTTP header
- Using rel=canonical on not so similar pages
- Using rel=canonical in combination with hreflang
- Conclusion: rel=canonical is a power tool