What’s a canonical tag?

Print anything with Printful



Canonical tags help search engines handle duplicate content by specifying a preferred address for indexing. It’s a small code that needs to be placed on all web pages with similar or duplicate content, but it’s not a command and can be ignored if poorly implemented. It can be used with both absolute and relative paths but generally cannot cross domains.

A canonical tag is a small piece of code embedded in a web page that can help search engines handle multiple versions of the same page. It is supported by three of the most popular search engines and allows webmasters to specify a preferred address for content that may be duplicated. Search engines usually respect this request and use the preferred address when indexing pages, but may ignore it under certain circumstances. Canonical tags, which are actually an element of the tag, can be used with both relative and absolute paths but generally cannot cross domains.

In early 2009, three major search engines decided to use the canonical tag to handle duplicate content on the web. You can often access similar or identical web pages from multiple web addresses or uniform resource locators (URLs), such as http://example.com, http://www.example.com, and http://www.example. com/index.php. Content management systems, e-commerce platforms, and wiki software can also generate pages dynamically, with slightly different URLs used to change the sort order of a category, track affiliate links, or access previous versions of an article or page.

Duplicate pages with slightly different addresses can work against search engine algorithms that use link popularity to determine a page’s ranking in search results. A web page with 300 links pointing to two different URLs might appear to a search engine’s indexing software as a single page with only 150 links. Search engines have historically addressed the problem by offering preferred URL settings in their webmaster tools, developing their own internal algorithms to guess the most appropriate address, and obeying 301 redirects, a status code generated by the server that forwards requests to a new URL.

The canonical tag is a way for web developers to mark a particular URL as a preferred version of a page. It’s a small snippet of code that needs to be placed on all web pages with similar or duplicate content, but it doesn’t require any changes to a web server’s settings. Most search engines consider this a “strong suggestion” rather than a command, meaning that a canonical tag that was poorly implemented or points to a completely different page could be ignored. The code is only meaningful to search engines; web browsers ignore canonical tags.

Despite the name, a canonical tag is not a true “tag” but an element that can be applied to the more common label. A page marked up with the code would tell a search engine that the preferred or canonical URL for the content is http://www.example.com/about.html. The “rel=canonical” portion of the code tells a search engine that the URL in “href=” is a canonical link. Unlike a 301 redirect, a canonical tag can be used with both absolute and relative paths, although some search engines recommend using absolute paths. 301 redirects, however, can point to a different domain, while most search engines only support canonical links on the same domain.




Protect your devices with Threat Protection by NordVPN


Skip to content