# Canonical tag

Category: [Crawling & Indexing](https://seo-geo-glossary.com/en/glossary/category/crawling-indexing/) › [Canonicals & duplicate content](https://seo-geo-glossary.com/en/glossary/category/crawling-indexing/canonicals-duplicate-content/) · Also known as: canonical URL, rel=canonical, canonical link element

A **canonical tag** is a `<link rel="canonical">` element in the `<head>` of a page that names the preferred URL when the same or very similar content is available at more than one address. Google treats it as a strong signal when choosing the canonical URL, the version it keeps in its index and shows in search results.

## How does the canonical tag work?

Duplicate URLs are usually a technical side effect. Filter and sort parameters, tracking parameters, `www` and non-`www` hosts, or a product listed in several categories all create extra URLs for the same content. A canonical tag consolidates these variants while keeping all of them accessible to users.

Google treats the tag as a hint and can choose a different URL. It lists three canonicalization methods by strength. Redirects and `rel="canonical"` are strong signals, and listing a URL in a sitemap is a weak one. When signals disagree, for example when the sitemap lists a different URL than the canonical tag, Google makes its own choice. The URL Inspection tool in Search Console shows which canonical Google selected.

For files without an HTML head, such as PDFs, the canonical URL can be sent in an HTTP `Link` header. The canonical link relation has been specified in RFC 6596 since April 2012.

## Example

A filtered category page points to the unfiltered category:

```html
<head>
  <link rel="canonical" href="https://www.example.com/shoes/" />
</head>
```

URL of the filtered page: `https://www.example.com/shoes/?color=red&sort=price`

The same signal as an HTTP header for a PDF:

```http
Link: <https://www.example.com/catalog.pdf>; rel="canonical"
```

## Common mistakes

- **Relative URLs.** Google recommends absolute URLs. Relative paths can point to the wrong host, for example when a test environment is accidentally crawlable.
- **The tag outside the `<head>`.** Google only accepts the element in the head section.
- **Canonicalizing with robots.txt or `noindex`.** Google advises against both for this purpose. A URL blocked by robots.txt cannot be fetched, so its canonical tag is never seen.
- **Conflicts with hreflang.** Google asks for a canonical page in the same language. If the English version declares the German version as canonical, the signals contradict each other.

## FAQ

**Does every page need a canonical tag?**
Google does not require one and says a site will likely do fine without specifying a canonical preference. Google does recommend adding a self-referential `rel="canonical"` link to the canonical page itself.

**What is the difference between a canonical tag and a 301 redirect?**
A 301 sends users and crawlers to another URL. A canonical tag leaves the page accessible and only tells search engines which version to index.

**Does Google use a canonical tag set with JavaScript?**
Yes, Google can pick it up during rendering, though it doesn't recommend this approach. JavaScript shouldn't change the canonical to a different URL than the one in the original HTML. According to a 2018 field test, Google honored canonicals added through Google Tag Manager. The four test URLs took between 10 and 34 days to be canonicalized.

## At a glance

- **Type:** rel="canonical" link element in the <head> or HTTP Link header
- **Affects:** choice of the canonical URL for duplicate content
- **Binding?:** no, a strong signal; Google can choose another URL
- **Specification:** [RFC 6596 (April 2012)](https://www.rfc-editor.org/rfc/rfc6596.html)
- **Docs:** [Google: Specify a canonical URL](https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls)

Last checked: October 8, 2026

## Controlling crawling and indexing: the options compared

| Method | Prevents crawling? | Keeps the URL out of Search? | What Google says | Typical use |
|---|---|---|---|---|
| robots.txt Disallow | yes | no, the URL can be indexed without its content if other pages link to it | used mainly to avoid overloading the server with requests; not a mechanism for keeping a page out of Google | Limiting crawler load, excluding areas from being fetched |
| noindex in the robots meta tag | no, Google has to be able to fetch the page | yes | only works if the page isn't blocked by robots.txt; Google then drops the page even if other sites link to it | HTML pages that stay reachable but shouldn't show up in search results |
| noindex in the X-Robots-Tag HTTP header | no, Google has to be able to fetch the URL | yes | any robots meta tag rule can also be sent as a header; same prerequisite as the meta tag | Files without an HTML head, such as PDFs, images or videos |
| rel="canonical" | no | not directly; a strong signal for which of several duplicate URLs becomes canonical | helps consolidate signals such as links into the preferred URL; don't use robots.txt or noindex for canonicalization | Duplicate and very similar pages, for example from parameters |
| Status code 410 (or 404) | no, but Google gradually fetches the URL less often | yes, a previously indexed URL is removed | treats 404 and 410 the same way | Page permanently removed with no replacement |
| Password protection (login) | yes, crawlers can't reach the content | yes | one of the ways Google lists for permanent removal; authorised users see the page, crawlers don't | Private or confidential content |
| Search Console: Removals | no, Google can keep crawling the URL | hides the URL from search results for about six months | temporary only; 404/410, password protection or noindex make it permanent | Urgent cases, until a permanent measure takes effect |

Sources: [Google Search Central: Introduction to robots.txt (last updated 2025-12-10)](https://developers.google.com/search/docs/crawling-indexing/robots/intro); [Google Search Central: Block Search indexing with noindex (last updated 2025-12-10)](https://developers.google.com/search/docs/crawling-indexing/block-indexing); [Google Search Central: Robots meta tag, data-nosnippet, and X-Robots-Tag specifications (last updated 2026-03-24)](https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag); [Google Search Central: How to specify a canonical URL (last updated 2026-07-10)](https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls); [Google Crawling Infrastructure: How HTTP status codes affect Google's crawlers (last updated 2026-02-04)](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes); [Google Search Central: Remove information from Google (last updated 2025-12-10)](https://developers.google.com/search/docs/crawling-indexing/remove-information); [Search Console Help: Removals and SafeSearch reports tool](https://support.google.com/webmasters/answer/9689846). Last checked: October 8, 2026

*Diagram: Duplicate cluster and canonical URL.* Google groups identical or very similar pages into a cluster and picks one canonical URL. According to Google, redirects and rel="canonical" are strong signals and the sitemap is a weak one. Your own preference remains a hint.

## Not to be confused with

- [noindex](https://seo-geo-glossary.com/en/glossary/noindex/index.md): keeps a page out of the index. A canonical tag leaves the page in place and names the version that should be indexed instead.

## Related terms

- [Duplicate content](https://seo-geo-glossary.com/en/glossary/duplicate-content/index.md)
- [noindex](https://seo-geo-glossary.com/en/glossary/noindex/index.md)
- [Canonicalization](https://seo-geo-glossary.com/en/glossary/canonicalization/index.md)
- [hreflang](https://seo-geo-glossary.com/en/glossary/hreflang/index.md)

## More on the searchVIU blog

- [JavaScript SEO surprise! Google DOES use JS-injected canonical tags.](https://www.searchviu.com/en/javascript-canonical-tags/)
- [How to use hreflang and canonical tags together](https://www.searchviu.com/en/hreflang-canonical/)

## Sources

- [How to specify a canonical URL with rel="canonical" and other methods – Google Search Central](https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls)
- [What is URL canonicalization – Google Search Central](https://developers.google.com/search/docs/crawling-indexing/canonicalization)
- [RFC 6596: The Canonical Link Relation](https://www.rfc-editor.org/rfc/rfc6596.html)
- [JavaScript SEO surprise! Google DOES use JS-injected canonical tags. – searchVIU blog (2018)](https://www.searchviu.com/en/javascript-canonical-tags/)
- [Understand the JavaScript SEO basics – Google Search Central](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics)

---

Last updated: October 8, 2026
URL: https://seo-geo-glossary.com/en/glossary/canonical-tag/
