Free auditStart free
GlossaryGlossary · Crawling

Canonical URL

What a canonical URL is, the three ways to signal one and how strong each is, the mistakes Google warns about, and how to see which URL Google picked.

5 min
read
3
sources
Oct 24, 2026
updated
Scaplet Editorial Team
author
In one line

A canonical URL is the one Google picks as the most representative from a set of duplicate pages. You can suggest it with a redirect or a rel="canonical" link, which Google calls strong signals, or by listing it in your sitemap, a weak signal. Google makes the final choice, and URL Inspection in Search Console shows which URL it picked.

30-second check

Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode
02At a glance

Three ways to signal it, and how strong each is

Google's guide to consolidating duplicate URLs ranks the methods. They "can stack and thus become more effective when combined," so use more than one where you can.
Method

Redirect (permanent)

Google's wording
A strong signal that the target of the redirect should become canonical
Use it for
URLs that shouldn't be visited at all, like HTTP or old paths
Method

rel="canonical"

Google's wording
A strong signal that the specified URL should become canonical
Use it for
Variants people still need, like filtered or tracked URLs
Method

Sitemap

Google's wording
A weak signal that helps the URLs that are included in a sitemap become canonical
Use it for
Listing only canonical URLs, as a supporting signal
In the <head> of every variant, including the canonical itself
<link rel="canonical" href="https://shop.example/shoes/runner" />
For PDFs and other non-HTML files, as a response header
Link: <https://www.example.com/downloads/white-paper.pdf>; rel="canonical"

Google says to use absolute URLs in the HTTP header too, and recommends a self-referential rel="canonical" on the canonical page itself. It also recommends picking either the element or the header rather than both, because using both is more error prone.

03Worth knowing

Why your canonical gets ignored

It's outside the `<head>`

Google accepts the rel="canonical" link element only if it appears in the <head> section of the HTML. Google says to make sure at least the <head> is valid HTML.

It's a relative path

Google says to use absolute paths rather than relative ones in the link element.

It ends in a fragment

Google generally doesn't support URL fragments as canonicals.

JavaScript rewrites it

If you inject the element with JavaScript, Google says to inject it properly and make sure scripts don't change it afterward.

Check the raw HTML and the HTTP header in one go
curl -s https://shop.example/shoes/runner | grep -io '<link[^>]*canonical[^>]*>'
curl -sI https://shop.example/downloads/guide.pdf | grep -i '^link:'

If the first command prints nothing but your template has the tag, something upstream (a cache, a CDN rule, a plugin) is stripping or moving it.

04Explained

What Google weighs when it chooses

Your signal is a strong hint, not a command. Google's canonicalization overview lists the signals it considers, including whether the page is served over HTTP or HTTPS, redirects, presence of the URL in a sitemap, and rel="canonical" annotations. When those signals disagree, Google may pick a different URL from the one you declared.

That's why consistency matters more than any single tag: link internally to the canonical, list only canonicals in the sitemap, redirect HTTP to HTTPS, and make every variant's canonical point the same way.

05Worth knowing

Mistakes Google warns about

Using robots.txt to canonicalize

Google says not to, because it may still index URLs disallowed in robots.txt without their content.

Using `noindex` to pick a canonical within a site

Google doesn't recommend it because it will completely block the page from Search; rel="canonical" is the preferred solution.

Sending mixed signals

Google advises against specifying different canonical URLs for the same page through different methods, such as one URL in the tag and another in the sitemap.

Using the URL removal tool for canonicalization

Google says it hides all versions of a URL from Search.

06How it works

How to check which URL Google picked

  1. 1

    Inspect the URL

    In Search Console, paste a duplicate into URL Inspection. Google's troubleshooting guide says to use this tool to check which page Google considers canonical.

  2. 2

    Compare the two

    If they differ, Google is reading other signals more strongly than your tag. Check internal links, the sitemap and redirects for the URL Google chose.

  3. 3

    Check the source

    Run curl -s https://shop.example/shoes/runner?color=blue | grep -i canonical to confirm the tag is in the served HTML, not only added later by JavaScript.

  4. 4

    Fix and re-inspect

    After aligning the signals, Google says it might hold pages in a duplicate cluster for up to two weeks. "Request Indexing" in URL Inspection can ask Google to re-evaluate, but it is subject to quotas, so reserve it for your most important URLs.

Questions

Asked a lot.

4 questions people ask next, answered from the sources on this page.

01Is rel="canonical" a directive?

No. Google calls it a strong signal, alongside redirects. Google chooses the canonical using several signals and may pick a different URL if they conflict.

02Should I use robots.txt to block duplicate URLs?

No. Google says not to use robots.txt for canonicalization, because it may still index disallowed URLs without their content.

03Does a canonical remove the duplicate from Google?

Not as such. Google says it shows only one version of duplicate content in results, and a canonical preference is a hint, not a rule. Using noindex to choose a canonical will completely block the page from Search, so Google prefers rel="canonical" for that.

04Can I set a canonical for a PDF?

Yes. Send a Link HTTP header with rel="canonical" and an absolute URL. Google supports this for web search results.

Sources · 3

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • google.com
  1. 01What is URL canonicalization (Google Search Central)developers.google.com · checked 2026-10-24
  2. 02How to specify a canonical URL with rel="canonical" and other methodsdevelopers.google.com · checked 2026-10-24
  3. 03Fix canonicalization issuesdevelopers.google.com · checked 2026-10-24
Free · 2 minutes

Know the term. Now check your site.

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly