Article
Canonical URLs: how Google handles duplicate pages
Short answer
A canonical URL is the one version of a duplicate or very similar page that you tell Google you’d prefer it to treat as the main one (Google Search Central). You signal that preference with redirects, a rel=“canonical” annotation or your sitemap, and if you skip all of it, Google picks the version it thinks is best to show users (Google Search Central).
Good news first. Google says none of these methods are required and your site “will likely do just fine” without them (Google Search Central). So this is housekeeping, not an emergency.
Where duplicate pages come from
You probably didn’t create duplicates on purpose. They happen because the same content is reachable at more than one address. Google’s doc shows several kinds:
| Tracking parameters | Google’s example is a product page at https://www.example.com/dresses/green/green-dress.html that people might also reach through https://example.com/dresses/cocktail?gclid=ABCD (Google Search Central). |
|---|---|
| Different hostnames | The same page can be reachable at https://example.com/home, https://home.example.com and https://www.example.com (Google Search Central). |
| HTTP and HTTPS versions | of the same page (Google Search Central). |
| Separate mobile URLs | , like a version on an m. subdomain (Google Search Central). |
| AMP variants | of a page (Google Search Central). |
| The same content in different file formats | , such as PDF and Microsoft Word, each on its own URL (Google Search Central). |
Our read: most small sites have at least a www/non-www pair and an HTTP/HTTPS pair, plus whatever parameters your ad and email tools bolt onto links.
Why tell Google which one you prefer
Google gives four reasons (Google Search Central):
- To pick which URL people see in search results (Google Search Central).
- To consolidate signals, such as links, from all the duplicate URLs into one preferred URL (Google Search Central).
- To make tracking metrics for a piece of content simpler (Google Search Central).
- To keep Googlebot from spending crawl time on duplicates instead of new or updated pages (Google Search Central).
Our read: number two is the one that matters most for a small site. If people link to three versions of the same page, you want those links counted together.
The methods, ranked by strength
Google lists its methods in order of how strongly they can influence canonicalization (Google Search Central).
Redirects (strong)
A redirect is a strong signal that the target of the redirect should become canonical (Google Search Central). Google says to use permanent redirects only when you’re retiring a duplicate page (Google Search Central). For the quickest effect, use server-side (HTTP) redirects (Google Search Central).
rel=“canonical” link element (strong)
A rel=“canonical” link annotation is also a strong signal (Google Search Central). You put a <link> element in the <head> of the duplicate pages, pointing at the canonical page, like this (Google Search Central):
<link rel="canonical" href="https://example.com/dresses/green-dresses" />A few rules from the doc:
- It’s only accepted if it appears in the
<head>, so that section needs to be valid HTML (Google Search Central). - Use absolute URLs, not relative paths; Google supports relative ones but says they can cause problems later (Google Search Central).
- Put one on the canonical page itself too, which Google calls a self-referential canonical (Google Search Central).
- It only works for HTML pages, not files such as PDFs (Google Search Central).
rel=“canonical” HTTP header (for files)
If you can change your server configuration, you can send the canonical as an HTTP response header, which works for non-HTML documents such as PDF files (Google Search Central). Google supports this method for web search results only (Google Search Central). Pick either the link element or the header for a given page, since using both is more error prone (Google Search Central).
Sitemap (weak)
Listing a URL in your sitemap is a weak signal that helps it become canonical (Google Search Central). It’s simple to implement and maintain, especially on large sites (Google Search Central). Google still decides which pages, if any, are duplicates based on how similar the content is (Google Search Central).
Stack them
These methods stack and get more effective when combined (Google Search Central). Our read: a self-referencing canonical tag plus a clean sitemap plus redirects for the old URLs is a sensible default.
HTTPS gets the nod by default
Google prefers HTTPS pages over equivalent HTTP pages as canonical (Google Search Central). That preference can break if the HTTPS page has an invalid SSL certificate, contains insecure dependencies other than images, redirects to or through an HTTP page, or has a rel=“canonical” pointing to the HTTP page (Google Search Central).
To lock it in, Google suggests redirecting HTTP to HTTPS, adding a rel=“canonical” from the HTTP page to the HTTPS page, or implementing HSTS (Google Search Central). Bad TLS/SSL certificates and HTTPS-to-HTTP redirects make Google prefer HTTP very strongly, and HSTS can’t override that (Google Search Central). Also, don’t list the HTTP versions of your pages in your sitemap (Google Search Central).
Mistakes Google says to avoid
| Using robots.txt for canonicalization | Google may still index blocked URLs without their content (Google Search Central). |
|---|---|
| Using the URL removal tool | It hides all versions of a URL from Search (Google Search Central). (That’s using a flamethrower to dust a shelf.) |
| Mixed messages | Don’t name one URL in your sitemap and a different one in rel=“canonical” for the same page (Google Search Central). |
| Pointing at a URL fragment | (the #section part), since Google generally doesn’t support them (Google Search Central). |
| Using noindex to choose a canonical | within your site, because it completely blocks the page from Search (Google Search Central). |
| Linking internally to duplicates | Link to the canonical URL consistently so Google understands your preference (Google Search Central). |
| Ignoring language | If you use hreflang, pick a canonical in the same language, or the best substitute language (Google Search Central). |
If your site leans on JavaScript
Google’s advice is to put the canonical URL in the HTML source and make sure JavaScript doesn’t change it (Google Search Central). If you can’t set it in the HTML, leave it out there and set it only with JavaScript (Google Search Central). Our read: the thing to avoid is two different canonicals, one in the source and one injected later.
A small-site checklist
All of this is our read, built from the doc above:
- Choose one hostname (www or not) and HTTPS. Redirect everything else there with server-side permanent redirects.
- Check your SSL certificate covers the exact host you use. Google notes the certificate must match your complete site URL or be a wildcard (Google Search Central).
- Make sure every page has a self-referencing canonical with an absolute URL. Many site builders and SEO plugins do this already; view the page source to confirm.
- Open your sitemap and confirm it lists only the HTTPS, preferred-host URLs, and that they match your canonical tags.
- Search your menus and old posts for links to the non-preferred version and update them.
- If you host PDFs that duplicate a web page, ask your host or developer about the rel=“canonical” HTTP header.
Key takeaway
What to do next
Spend fifteen minutes on steps 1 and 3 this week. Type your domain with and without www, and with http instead of https, and see where each lands. If they all end up at the same address and your page source shows a matching canonical, you’ve handled the bulk of it.
Our read: Google’s doc is about Google Search, and it says nothing about how AI assistants pick URLs. Clean, consistent URLs are a sensible base either way, but nobody outside those companies can tell you how much it counts there. For how Be In GEO checks every claim it publishes, see how Be In GEO works.
Get the worksheet
Want to see which sites AI answers cite for the questions your customers ask? Grab the free worksheet at beingeo.com/checklist. You’ll also get short emails with each new teardown.