Deutsch
Canonicals & duplicate content

Canonical tag

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.

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

Last checked:

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.

Controlling crawling and indexing: the options compared
MethodPrevents crawling?Keeps the URL out of Search?What Google saysTypical use
robots.txt Disallowyesno, the URL can be indexed without its content if other pages link to itused mainly to avoid overloading the server with requests; not a mechanism for keeping a page out of GoogleLimiting crawler load, excluding areas from being fetched
noindex in the robots meta tagno, Google has to be able to fetch the pageyesonly works if the page isn't blocked by robots.txt; Google then drops the page even if other sites link to itHTML pages that stay reachable but shouldn't show up in search results
noindex in the X-Robots-Tag HTTP headerno, Google has to be able to fetch the URLyesany robots meta tag rule can also be sent as a header; same prerequisite as the meta tagFiles without an HTML head, such as PDFs, images or videos
rel="canonical" (this term)nonot directly; a strong signal for which of several duplicate URLs becomes canonicalhelps consolidate signals such as links into the preferred URL; don't use robots.txt or noindex for canonicalizationDuplicate and very similar pages, for example from parameters
Status code 410 (or 404)no, but Google gradually fetches the URL less oftenyes, a previously indexed URL is removedtreats 404 and 410 the same wayPage permanently removed with no replacement
Password protection (login)yes, crawlers can't reach the contentyesone of the ways Google lists for permanent removal; authorised users see the page, crawlers don'tPrivate or confidential content
Search Console: Removalsno, Google can keep crawling the URLhides the URL from search results for about six monthstemporary only; 404/410, password protection or noindex make it permanentUrgent cases, until a permanent measure takes effect

robots.txt and noindex cancel each other out. If a URL is blocked by robots.txt, Google never sees the noindex, and the URL can still appear in results. Google doesn't support noindex inside the robots.txt file itself. Sources: Google Search Central: Introduction to robots.txt (last updated 2025-12-10); Google Search Central: Block Search indexing with noindex (last updated 2025-12-10); Google Search Central: Robots meta tag, data-nosnippet, and X-Robots-Tag specifications (last updated 2026-03-24); Google Search Central: How to specify a canonical URL (last updated 2026-07-10); Google Crawling Infrastructure: How HTTP status codes affect Google's crawlers (last updated 2026-02-04); Google Search Central: Remove information from Google (last updated 2025-12-10); Search Console Help: Removals and SafeSearch reports tool. Last checked: .

Duplicate cluster and canonical URLFour URL variants of the same category page form a cluster: an HTTP version, a version without www, one with the tracking parameter gclid and one with a sort parameter. Google picks https://www.example.com/dresses/ as the canonical URL. Below are the signals in order of strength according to Google: redirect strong, rel="canonical" strong, sitemap weak.DUPLICATE CLUSTERCANONICAL URLhttp://www.example.com/dresses/protocol variant (HTTP)https://example.com/dresses/host variant (no www)https://www.example.com/dresses/?gclid=ABCDtracking parameterhttps://www.example.com/dresses/?sort=pricesort function (parameter)Google pickshttps://www.example.com/dresses/usually shown in resultsand crawled mostregularlyWHAT INFLUENCES THE CHOICE, BY STRENGTH ACCORDING TO GOOGLE1redirect to the preferred URLstrong2rel="canonical" (HTML link or HTTP header)strong3URL listed in the sitemapweakGoogle also prefers HTTPS over HTTP.Schematic. The preference is a hint. Google may choose a different URL as canonical.Several signals pointing to the same URL are stronger together.
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. Sources: Google Search Central: What is URL canonicalization; Google Search Central: How to specify a canonical URL with rel="canonical" and other methods.

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.

Sources

  1. How to specify a canonical URL with rel="canonical" and other methods – Google Search Centraldevelopers.google.com
  2. What is URL canonicalization – Google Search Centraldevelopers.google.com
  3. RFC 6596: The Canonical Link Relationrfc-editor.org
  4. JavaScript SEO surprise! Google DOES use JS-injected canonical tags. – searchVIU blog (2018)searchviu.com
  5. Understand the JavaScript SEO basics – Google Search Centraldevelopers.google.com

Last updated: