Canonical – rel=canonical: the ultimate guide by Yoast SEO

Canonical – rel=canonical: the ultimate guide by Yoast SEO is one in a million guide you need to promote your content in search engine overnight and better your Organic Traffic free of charge without any stress. Meanwhile, Yoast has it all as their explains in full details what Canonical – rel=canonical is all about. here are what you should know …

canonical

Full rel=canonical: the ultimate guide

What is Canonical all about? … By Yoast.com

A canonical URL lets you tell search engines that certain similar URLs are actually the same. Sometimes you have products or content that can be found on multiple URLs – or even multiple websites, but by using canonical URLs (HTML link tags with the attribute rel=canonical), you can have these on your site without harming your rankings.

The rel=canonical element often called the “canonical link”, is an HTML element that helps webmasters prevent duplicate content issues. It does this by specifying the “canonical URL”, the “preferred” version of a web page – the original source, even. Using it well improves a site’s SEO.

The idea is simple: if you have several similar versions of the same content, you pick one “canonical” version and point the search engines at it. This solves the duplicate content problem where search engines don’t know which version of the content to show in their results. This article takes you through how and when to use them, and how to avoid common mistakes.

The SEO benefit of rel=canonical

Choosing a proper canonical URL for every set of similar URLs improves the SEO of your site. This is because the search engine knows which version is canonical, so it can count all the links pointing at all the different versions as links to the canonical version. Setting a canonical is similar in concept to a 301 redirect, only without actually redirecting.

History of rel=canonical

In February 2009 GoogleBing and Yahoo! introduced the canonical link element – if you want to learn about its history, Matt Cutts’ post gives the clearest explanation. While the idea is simple, the specifics of how to use it are often complex.

How to set canonical URLs

A correct example of using rel=canonical …

Let’s assume you have two versions of the same page, each with exactly – 100% – the same content. The only difference is that they’re in separate sections of your site and because of that the background color and the active menu item are different – that’s it. Both versions have been linked to from other sites, so the content itself is clearly valuable. So which version should search engines show in results?

For example, these could be their URLs:

  • http://example.com/wordpress/seo-plugin/
  • http://example.com/wordpress/plugins/seo/

This is what rel=canonical was invented for and, unfortunately, this happens fairly often, especially in a lot of e-commerce systems. A product can have several different URLs depending on how you got there. In this case you would apply rel=canonical as follows:

  1. Pick one of your two pages as the canonical version. This should be the version you think is the most important. If you don’t care, pick the one with the most links or visitors, and if all else is equal, flip a coin. You just need to choose.
  2. Add a rel=canonical link from the non-canonical page to the canonical one. So if we picked the shortest URL as our canonical URL, the other URL would link to the shortest URL in the <head> section of the page – like this:
    <link rel="canonical" href="http://example.com/wordpress/seo-plugin/" />

    That’s it. Nothing more, nothing less.

What this does is “merge” the two pages into one from a search engine’s perspective. It’s a “soft redirect”, without redirecting the user. Links to both URLs now count as the single, canonical version of the URL.

When should you use canonical URLs?

301 redirect or canonical?

If you are unsure whether to do a 301 redirect or set a canonical, what should you do? The answer is simple: you should always do a redirect unless there are technical reasons not to. If you can’t redirect because that would harm the user experience or be otherwise problematic, then set a canonical URL.

Should a page have a self-referencing canonical URL?

In the example above, we link the non-canonical page to the canonical version. But should a page set a rel=canonical for itself? This question is a much-debated topic amongst SEOs. At Yoast, we strongly recommend having a canonical link element on every page and Google has confirmed that’s best. That’s because most CMS’s will allow URL parameters without changing the content. So all of these URLs would show the same content:

  • http://example.com/wordpress/seo-plugin/
  • http://example.com/wordpress/seo-plugin/?isnt=it-awesome
  • http://example.com/wordpress/seo-plugin/?cmpgn=twitter
  • http://example.com/wordpress/seo-plugin/?cmpgn=facebook

The issue is that if you don’t have a self-referencing canonicals on the page that points to the cleanest version of the URL, you risk being hit by this. If you don’t do it yourself, someone else could do it to you and cause a duplicate content issue, so adding a self-referencing canonical to URLs across your site is a good “defensive” SEO move. Luckily, our Yoast SEO plugin does this for you.

Conclusion: rel=canonical is a power tool

Rel=canonical is a powerful tool in an SEO’s toolbox, but like any power tool, you should use it wisely as it’s easy to cut yourself. For larger sites, the process of canonicalization can be very important and lead to major SEO improvements.

Read more: rel=canonical is a power tool »

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.