The rel='canonical' attribute is an HTML element that enables webmasters to prevent duplicate content issues by specifying the "canonical", or "preferred", version of a web page.
For example, the same web page could be available in a web version and a print version. By using the rel='canonical' tag in the print version, you show search engines that the web version is the version that should be found in the search results.
The canonical tag should only be used as a last resort. You should try to avoid duplicate content in the first place. Before adding the tag, try the following to avoid duplicate content problems:
That said, there are several pages on which you should use the rel='canonical' tag:
It is very important that you use the canonical tag correctly. If you enter the wrong URLs, this can have a negative impact on your search engine rankings.
Here are the most common rel='canonical' mistakes:
If you don't use the canonical tag correctly, your website might be removed from Google. If you're not sure what you're doing, better do not use the canonical tag at all.
Google sees the rel='canonical' tag as a 'strong suggestion' that they might ignore. If the pages with the canonical URL are totally different, Google will index them anyway.