Canonical refers to the use of the <link rel="canonical"> tag to specify the “canonical URL” of a web page. This tag is used to tell search engines what the preferred version of a URL is, in cases where multiple versions of a URL might exist. The purpose of specifying a canonical URL is to prevent issues related to duplicate content, which can negatively affect a site’s search engine ranking.

Duplicate content can occur in various scenarios, such as:

  • HTTP and HTTPS versions of a website (e.g., http://example.com vs. https://example.com)
  • WWW and non-WWW versions of a domain (e.g., www.example.com vs. example.com)
  • Index pages (e.g., example.com/index.html vs. example.com/)
  • URL parameters that track clicks or sessions (e.g., example.com/product?ref=homepage vs. example.com/product)
  • Print versions of web pages

Using the canonical tag helps webmasters communicate to search engines which version of a URL they consider to be the definitive one. This ensures that search engines index and rank the preferred URL, while other versions are seen as duplicates and not treated as separate content in search results. It effectively consolidates link equity (the cumulative value provided by all inbound links) to the canonical URL, which can help improve its ranking in search engine results pages (SERPs).

To implement a canonical tag, you include it in the <head> section of the HTML of the web page, like this:

html
<link rel="canonical" href="http://www.example.com/preferred-url.html" />

This tag tells search engines that http://www.example.com/preferred-url.html is the canonical or preferred version of the page, even if there are multiple accessible URLs that display similar or identical content.

The use of the canonical tag is an essential part of SEO best practices. It helps maintain a cleaner site architecture, prevents content duplication issues, and ensures that search engines are indexing and ranking the site’s content effectively.