- Do you even need to set a canonical URL?
- The ways to tell Google your canonical, ranked by strength
- How to add a rel=canonical tag
- When to use a redirect instead
- HTTPS, sitemaps and internal links
- What not to use for canonicalisation
- Setting up canonical URLs on a small site
- Where I come in
- My verdict on canonical URLs
- Frequently asked questions
A canonical URL is the version of a page you want Google to treat as the main one when the same or very similar content can be reached at more than one address. You can signal it with a redirect, a rel=canonical tag or your sitemap, but if you don't, Google picks one for you.
Duplicate addresses are more common than people think. Google's own example is a product page that exists at a clean URL and again with a tracking parameter such as gclid tacked on the end. To a person they're the same page. To a search engine they're two URLs, and it has to decide which one to show.
Do you even need to set a canonical URL?
This is the bit most guides leave out. Google's documentation on consolidating duplicate URLs (last updated 10 July 2026, read in October 2026) says none of the methods is required. If you don't specify a canonical, Google works out which version it judges best to show users, and it says a site will likely do fine without specifying one.
Google gives four reasons you might still want to:
- To choose which URL people see in search results.
- To consolidate signals, such as links, from similar or duplicate pages.
- To make tracking the metrics for one piece of content simpler.
- To avoid spending crawl time on duplicates.
The ways to tell Google your canonical, ranked by strength
Google ranks the methods by how much influence they have, and says they stack, so using more than one increases the chance your preferred URL is the one shown.
| Method | Strength (Google) | Good for | Watch out |
|---|---|---|---|
| Permanent redirect | Strong | Retiring a duplicate page | Only when you're removing the duplicate |
| rel=canonical link element | Strong | Duplicates that must stay live | Has to sit in the page head; use absolute URLs |
| rel=canonical HTTP header | Strong (web search only) | PDFs and other non-HTML files | Don't also set an element that disagrees |
| Sitemap | Weak | Large sites, simple to maintain | List only the canonical, HTTPS versions |
How to add a rel=canonical tag
Add a link element to the head section of each duplicate page, pointing at the canonical page. It looks like this: <link rel="canonical" href="https://www.example.com/dresses/green-dress/">. Google also says to add the same tag to the canonical page itself, pointing at its own address. That's what people mean by a self-referencing canonical.
Three details trip people up. Use absolute URLs, with the full https address, not relative paths. The tag is only accepted in the head, so that part of your page has to be valid HTML. And canonical annotations that carry hreflang, lang, media or type attributes are ignored for canonicalisation.
For files that aren't HTML, such as PDFs, you can send the same signal as a Link HTTP header with rel=canonical. Google supports that for web search results only. Pick the element or the header for a page, not both, because Google says using both is more error-prone.
If you're on WordPress, Wix or Blogger, Google notes you may need to use your CMS's search engine settings page rather than editing HTML. On WordPress that usually means your SEO plugin, which adds a self-referencing canonical to each page for you.
When to use a redirect instead
If you want to get rid of a duplicate page altogether, Google recommends a permanent redirect, and server-side redirects take effect fastest. Its example is a site reachable at example.com/home, home.example.com and www.example.com: choose one and redirect the others to it. If you're not sure what your redirects are doing now, here's how to check redirects.
HTTPS, sitemaps and internal links
Google prefers HTTPS over HTTP as the canonical version unless something's wrong with it, such as an invalid SSL certificate, insecure dependencies, an HTTPS page that redirects through HTTP or a canonical link pointing at HTTP. Don't list HTTP versions in your sitemap or hreflang annotations. A sitemap is only a weak signal, but it should still list canonical URLs only, and this guide shows you how to create an XML sitemap. Link internally to the canonical version too, not a duplicate.
Want AI doing the heavy lifting in your marketing?
I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.
What not to use for canonicalisation
Google's documentation lists the methods to avoid:
- robots.txt: Google may still index a disallowed URL, just without its content.
- The URL removal tool: it hides every version of the page from Search.
- noindex: it blocks the page completely. Within one site, rel=canonical is the preferred choice.
- Different canonicals through different methods for the same page.
- A URL fragment, the part after a hash sign, as the canonical.
Setting up canonical URLs on a small site
- Pick the one URL you want shown: HTTPS, on one host version.
- Make sure it carries a self-referencing rel=canonical.
- Point duplicate and parameter versions at it with rel=canonical, or redirect them if they can go.
- List only canonical URLs in your sitemap.
- Link internally to the canonical version.
- Never use robots.txt or noindex to do this job.
Once it's set up, you can check how Google sees any page with the URL Inspection tool in Search Console.
Where I come in
Technical SEO is part of what I do for clients, and duplicate URLs are one of the first things I check: parameter versions, http and www variants, and pages that were copied rather than redirected. I'll sort out the settings in your SEO plugin and make sure your sitemap and internal links all point at the same version. You can see how I work on my work with me page.
My verdict on canonical URLs
Most small sites need almost nothing here beyond the self-referencing canonical their SEO plugin already adds. The real job of this guide is to stop you reaching for noindex or robots.txt when you spot a duplicate. Those block or hide pages. They don't tell Google which one is the main version. Use a redirect if the duplicate can go, rel=canonical if it has to stay, and leave it at that.
Frequently asked questions
What is the difference between a canonical URL and a redirect?
A redirect sends visitors and Google to another URL, so the duplicate stops being reachable. A canonical tag leaves the duplicate live but tells Google which version is the main one.
Is a canonical tag required?
No. Google says none of the methods is required and it will choose a canonical itself if you don't, though setting one lets you choose which URL appears in results.
Should a page have a canonical tag pointing to itself?
Yes. Google says to add a self-referencing canonical to the canonical page as well as pointing duplicates at it.
Can I use noindex instead of a canonical tag?
Not to pick a canonical within one site. Google says noindex blocks the page completely and rel=canonical is the preferred option.


