What is a canonical tag?

Crawvix Editorial Team · Published November 1, 2026 · Last updated November 1, 2026 · 2 min read

A canonical tag is a line of HTML in the head of a page that names the preferred URL for that content. It is written as a link element with rel="canonical". Search engines use it as a strong hint about which of several similar URLs to show in results, and it helps consolidate duplicate pages.

Why it matters

One page can be reachable at several addresses, for example with tracking parameters, with and without a trailing slash, or on both http and https. Search engines then have to decide which address to treat as the main one. A canonical tag states your choice. Google describes it as a hint rather than a command, so it can still choose differently if other signals disagree.

How to add and check it

  1. Decide the single preferred URL for the page, including protocol, host and path.
  2. Add this line inside the <head> section:
<link rel="canonical" href="https://www.example.com/blue-widgets/">
  1. Use an absolute URL, meaning the full address starting with https, rather than a relative path.
  2. Give every page a canonical tag that points to itself when it is the preferred version. This self-referencing tag protects against stray parameters.
  3. Point duplicate or near-duplicate variants at the main page, for example a filtered or tracked URL that shows the same content.
  4. Check your pages. View the page source and search for rel="canonical", or use the URL Inspection tool in Google Search Console, which reports the canonical Google selected.
  5. Make sure the canonical URL returns a 200 status, is not blocked by robots.txt, is not marked noindex and is listed in your sitemap.

For non-HTML files such as PDFs, the same hint can be sent in an HTTP Link header.

Common mistakes

  • Placing the tag in the body, where it is ignored.
  • Using more than one canonical tag on a page, with conflicting addresses.
  • Pointing canonicals at a redirected, broken or noindex URL.
  • Canonicalizing every page to the home page.
  • Using relative URLs or the wrong protocol and host.

Frequently asked questions

Is a canonical tag the same as a redirect?

No. A redirect sends visitors to another URL, while a canonical tag leaves the page accessible and only suggests which URL to index.

Does Google always follow the canonical tag?

No. It treats the tag as a strong hint and may pick another URL if redirects, links or the sitemap point elsewhere. Keep those signals consistent.

Do I need a canonical tag on every page?

It is good practice. A self-referencing canonical on each page makes your preference clear even when someone links to a variant with extra parameters.

To see how your own pages declare their canonical address, Try the free website sample.

In this category

All 100 Quick answers guides