How to use canonical tags correctly
Quick answer
A canonical tag tells Google which URL is the preferred version when the same or very similar content lives at more than 1 address. Put a self-referencing rel=canonical with an absolute URL on each page and point true duplicates at the main version. Google treats it as a strong signal, not a command.
Why it matters
Duplicate URLs are everywhere: the same page with and without www, with tracking parameters, with a trailing slash, or in print and filtered views. Google picks 1 version to show, and it will not always pick the one you want.
Telling Google your preference consolidates links and metrics onto 1 URL, makes reporting cleaner, and keeps crawlers from spending time on copies. Google says none of this is required, since it will choose a version on its own, so the goal is control and tidy data.
Key takeaways
- Redirects and rel=canonical are strong signals. A sitemap is a weak one. Using several together is more effective.
- Put a self-referencing canonical on every page you want indexed, using an absolute URL.
- Do not use robots.txt, noindex, or the URL removal tool to choose a canonical.
- Keep every signal pointing to the same URL, including internal links and the sitemap.
Step by step
-
Find the duplicates
List the ways 1 page can be reached: http and https, www and non-www, trailing slash, uppercase and lowercase paths, tracking and sort parameters, and printer-friendly versions. Crawl the site or use the Page indexing report in Search Console to see which duplicates exist.
-
Choose the preferred URL for each set
Pick the clean, permanent address you want people to land on. Prefer the version with no parameters, on your main host and protocol. Write the choices in a sheet so developers and editors work from the same list.
-
Pick the right method
Use a permanent redirect when you are retiring a duplicate and nobody needs it. Use
rel=canonicalwhen the duplicate must stay reachable, such as a filtered view. Use the HTTP header version for PDFs and other files. Choose either the link element or the header, not both. -
Add self-referencing canonicals
Put a
link rel=canonicalelement in the head of every indexable page, pointing to its own absolute URL, and on duplicates pointing to the preferred page. Use full URLs, not relative paths. Google recommends the self-referencing tag on the canonical page itself. -
Line up every other signal
Link internally to the canonical URL only. List only canonical URLs in your sitemap. Do not point a sitemap at 1 URL and a canonical tag at another for the same page.
-
Handle JavaScript rendering carefully
If a script builds your pages, set the canonical in the HTML source and make sure scripts do not change it. If you cannot set it in the source, leave it out of the source and set it only with script. Mixed versions confuse the signal.
-
Verify in Search Console
Inspect a sample of URLs and compare the user-declared canonical with the Google-selected canonical. If they differ, look at whether the pages are actually similar, since Google will not treat a page as a duplicate if the content is different. Fix the mismatch or the signals.
-
Monitor over time
Watch the Page indexing report for statuses such as duplicate pages and alternate pages with a proper canonical tag. Google says a duplicate flagged there is usually fine, since it means the canonical was found. Investigate only when an important page is the one left out.
Example markup
A canonical element in the head of a filtered page, pointing to the main category page.
<head>
<title>Water heaters in Hartford</title>
<link rel="canonical" href="https://example.com/water-heaters" />
</head>
On the main page itself, the same tag points to its own address.
<link rel="canonical" href="https://example.com/water-heaters" />
For a PDF or another file, send the preference as a response header.
Link: <https://example.com/guides/water-heater-guide>; rel="canonical" How Doily helps
Doily's site audit crawls your site and ranks fixes by priority, giving you a list of pages to check against your canonical sheet.
Questions
Should every page have a canonical tag?
It is recommended for indexable pages. Google suggests a self-referencing rel=canonical on the canonical page itself. It is not required, because Google picks a canonical on its own when you do not specify one.
Can I use noindex instead of a canonical?
Google does not recommend noindex to choose a canonical within a single site, because it blocks the page from Search entirely. rel=canonical is the preferred tool.
Why did Google choose a different canonical than mine?
Google treats your tag as a strong signal, not an order. It may choose another URL if the pages are not similar or if other signals, such as redirects, internal links, and the sitemap, disagree with your tag.
Sources
Primary sources, checked Oct 11, 2026.