Canonical tag
The canonical tag points to the original version of a web page, so you avoid duplicate content. Duplicate content means Google finds the same content at more than one URL. It is a big problem for many web shops and can make your rankings melt away.
What does the canonical tag do?
The canonical tag is an HTML tag that goes in the head of a page and points to the original version of that page.
With it, you tell Google that the original version of the page lives at the URL in the tag. That is useful when you have several versions of the same page online that differ little or not at all.
Without it, Google may index the wrong page, or split the PageRank of your important page across, say, three separate URLs. Both can cost you a lot of rankings.
A canonical tag looks like this:
<link rel="canonical" href="https://www.example.com/my-original-location" />
When should you use the canonical tag?
The canonical tag helps you keep duplicate content out of Google. There are three situations where it is especially useful.
1. Canonical tag on sorted and filtered pages
Web shops often let you sort products in different ways: by color, by price or by popularity, for example. Those three pages have the same content in a different order. Use the canonical tag on all three to point to the original page.
2. Canonical tag for duplicate content
Many web shops list the same product in several categories, so the product page exists at two different URLs. Google rightly sees that as duplicate content. The canonical tag fixes it.
3. Canonical tag as a default
It is often a good idea to add a canonical tag to every page by default. We regularly see indexing go wrong because of a small mistake by the webmaster. Add one 'w' too many to a link, for example, and you are suddenly linking to wwww.example.com. The page is now available at both www.example.com and wwww.example.com. Had you set a canonical tag as a precaution, Google would have known right away that www.example.com is the correct version.