
Similar HTML documents can take the importance in the search engine results of each other. Unfortunately, search engines often find the same document under different URIs on one website: with www or without and under https:// or http:// and in some cases with different parameters.
So how can we tell the search engines, which URI should be indexed by the search engines?
The common way to solve this problem is to define a so called "301 redirect" in the .htaccess file. When a document is called using a "unwanted" URI, the server responses with the message, that the document has been moved to the correct URI. Setting up these 301 Redirects can sometime be tricky and requires a web hosting environment allowing own .htaccess files.
To make it easier for webmasters, the major search engines started in 2009 to support the so called "canonical tag" or "canonical link tag". It allows to specify the exact URI of the document which should be indexed by the search engines.
There is actually no HTML element which is called "canonical". So <canonical ... /> would not validate. The "canonical link tag" is a link element with the realtion "canonical", refering to the final URI:
<link rel="canonical" href="http://www.example.com/product.html" />
Since the canonical link tag has been invented recently, it may not be supported by all search engines. However, the use of the canonical link tag is recommended by the market leading search engines which cover the majority of the market.