Fixing Canonical and URL Conflicts
A canonical conflict happens when one page can be reached at several addresses and the site gives mixed answers about which one is real. The redirect says one thing, the canonical tag another, the sitemap a third. Search engines try to untangle this themselves, with varying success.
AI crawlers may simply fetch each copy as a separate page, spend their limited visits on duplicates and quote whichever address they found first. This guide shows how to list every place your site declares a URL, find where they disagree, and make them all name the same address.
One page, many addresses
To a person, example.co.uk/boilers and https://www.example.co.uk/boilers/
are obviously the same page. To software they are different URLs that happen to return similar content.
Most sites quietly accept many variations of each address, and every one of them is a possible copy:
- http and https versions
- with and without
www - with and without a trailing slash
- upper and lower case letters in the path, on servers that treat them the same
/index.htmlor/index.phpon the end- tracking parameters such as
?utm_source=newsletter, and sorting or filter parameters - the same product reached through different category paths
- old staging or preview domains that still serve the site
Having variants is normal. The conflict arises when the site does not answer clearly which variant is the real one, or answers differently in different places. The Agent Readiness Audit flags pages where those declarations disagree, because a crawler that meets the disagreement has to guess.
Every place your site names a URL
There is no single canonical setting. The preferred address is stated, directly or indirectly, in several places, and they are often maintained by different people or plugins. All of them need to name the same URL.
| Signal | Where it lives | Strength |
|---|---|---|
| 301 or 308 redirect | Server, CDN or CMS redirect rules | Strongest. Every client that follows redirects ends up on the target, whether or not it understands canonical tags. |
<link rel="canonical"> | The HTML head | A strong hint to search engines. Only works if it is in the head of the HTML the server sends. |
Link header with rel="canonical" | HTTP response headers | Same meaning as the tag. Useful for PDFs and other files that have no HTML head. |
XML sitemap <loc> | sitemap.xml | A weaker hint that these are the addresses you care about. |
| Internal links | Navigation, body text, breadcrumbs | A weaker but constant hint, repeated on every page. |
og:url | Open Graph tags | Used by social and chat previews; a mismatch spreads the wrong address when people share. |
JSON-LD url and @id | Structured data | Tells systems reading the markup which address the entity lives at. |
| hreflang alternates | Head, headers or sitemap | Each alternate should point at the canonical version of the other language. |
Search engines combine these hints to choose one address, and Google may pick a different one from the one you declared when the hints disagree. Nobody outside the AI companies knows exactly how each AI crawler handles canonical tags, and it is safest to assume some treat each address they fetch as its own page. That is why redirects matter most: they are the only signal every client obeys, because the client never receives the duplicate at all.
Why this matters more for AI crawlers
Google has spent many years building systems to cluster duplicate pages. AI crawlers are newer, and their operators publish much less about how they handle duplicates. Three practical effects follow.
- Wasted visits. A crawler that fetches the same article at five addresses has spent five requests on one page, and may not reach pages it would otherwise have read.
- Addresses you did not choose. When an answer engine links to your page, it links to the address it knows. If that is a tracking URL from a newsletter or an old http address, readers arrive through a redirect, or not at all if the variant no longer works.
- Stale copies. If an old variant still serves an outdated version, for example a cached page on a staging host, the crawler can quote content you have since corrected.
Finding the conflicts
Follow the redirects
Request each common variant and watch where it ends up. The -L option follows redirects
and -I shows only headers, so each hop appears in turn:
curl -sIL http://example.co.uk/boilers | grep -iE "^HTTP|^location"
curl -sIL https://example.co.uk/boilers/ | grep -iE "^HTTP|^location"
curl -sIL https://www.example.co.uk/Boilers | grep -iE "^HTTP|^location"
Every variant should reach the preferred address in one hop and finish on a 200. Two or three hops in a row, such as http to https, then non-www to www, then adding the slash, form a chain. A variant that returns 200 without redirecting is an unhandled duplicate.
Read the declared canonical
curl -s https://www.example.co.uk/boilers/ | grep -io '<link[^>]*canonical[^>]*>'
curl -sI https://www.example.co.uk/files/price-list.pdf | grep -i "^link"
Check that exactly one canonical tag appears, that it is an absolute https address, and that it matches
the URL you just requested. Then request a parameter version, such as ?utm_source=test,
and check the canonical still names the clean address.
Compare with the sitemap and structured data
Search the sitemap for the page and compare the <loc> character by character with
the canonical. Do the same for og:url and the url in any JSON-LD. Trailing
slashes and www are the usual differences.
Ask Google which address it chose
In Search Console, the URL Inspection tool shows the user-declared canonical and the Google-selected canonical. When they differ, Google has decided your other signals outweigh the tag, which is a clear sign they disagree. The Pages report also lists pages marked as duplicates where Google chose a different canonical.
Common conflicts and what fixes them
| What you find | Why it happens | Fix |
|---|---|---|
| Canonical has no trailing slash, sitemap and links have one | Template and sitemap generator built separately | Pick one form, redirect the other, generate every signal from the same function |
| Two canonical tags on one page | Theme and SEO plugin both output one | Remove one; Google says it may ignore conflicting canonical tags altogether |
| Canonical points at a URL that redirects | Addresses changed but templates did not | Point the canonical straight at the final address |
| Canonical points at a page marked noindex or returning 404 | Old page removed, canonical left | Point it at a live, indexable page, usually the page itself |
| Every paginated page canonicalises to page 1 | Well-meant plugin setting | Give each page in a series its own self-referencing canonical |
| Canonical added by JavaScript | Single-page app sets head tags in the browser | Output the tag in server HTML; crawlers that do not run scripts never see it |
| Staging domain still serves the site | Preview host left public | Password-protect staging or redirect it; never let it canonicalise to itself |
| Canonical tag in the body | Injected by a widget or late script | Move it into the head; tags outside the head are ignored |
Redirect rules that settle host and protocol
Host and protocol variants are best handled once, at the server or CDN, so each wrong combination reaches the right address in a single hop. On nginx, a separate server block for the non-preferred host does this cleanly:
server {
listen 80;
listen 443 ssl;
server_name example.co.uk www.example.co.uk;
# certificate directives for both names go here
if ($host = example.co.uk) { return 301 https://www.example.co.uk$request_uri; }
if ($scheme = http) { return 301 https://www.example.co.uk$request_uri; }
# normal site configuration continues below
}
On Apache with .htaccess, one rule catches both http and the bare domain, sending them straight to the final address:
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.example.co.uk%{REQUEST_URI} [L,R=301]
If your hosting has a CDN in front, it may be simpler to set these redirects in the CDN's rules, which act before the request reaches your server. Either way, avoid doing it in both places, which is how chains start. Trailing slash and case handling usually belong in the CMS or framework, because they depend on how routes are defined.
For tracking and sorting parameters, you normally do not redirect: the page must still work with them. Instead, keep the canonical tag pointing at the clean address and avoid using parameter URLs in your own internal links and sitemap. Google retired the Search Console URL Parameters tool in 2022, so there is no setting there to lean on.
The fix, step by step
Step 1
Write down the one URL format you want
Decide, and write down where the whole team can see it, the protocol, host, trailing slash convention, letter case and which parameters are allowed to change content. For most sites that means https, one chosen host, lowercase paths, one slash rule and no tracking parameters in canonical addresses. Everything else in this fix is about making every system obey that one short rule, so settle it before touching any configuration.
Step 2
Enforce it with single-hop redirects
Add
permanent redirects at the server, CDN or CMS so that every variant of host, protocol, slash and case
goes directly to the preferred address. Test each variant with curl -sIL and confirm there
is exactly one 301 or 308 followed by a 200. Remove duplicate rules at other layers that create chains,
and redirect or lock any staging or old domains that still serve copies of the site.
Step 3
Set a self-referencing canonical on every page
Make sure each indexable page outputs exactly one <link rel="canonical">
in the head of the server HTML, using the absolute preferred address of that same page. Remove extra
tags added by themes, plugins or scripts. For PDFs and other files that should be found, send the equivalent
Link header. Check that no canonical points at a redirect, a 404 or a page marked noindex.
Step 4
Align the sitemap, og:url and structured data
Regenerate the XML sitemap so it lists only final canonical addresses, with no redirects,
parameters or noindexed pages. Change the og:url tag and the url and @id
values in JSON-LD to use the same address as the canonical, character for character. Ideally, have the
template build all of these from one variable so they cannot drift apart when someone edits one of them
later.
Step 5
Clean up internal links and parameters
Search the site for internal links that use a non-preferred form: http addresses, the other host, the wrong slash or tracking parameters. Update menus, footers, breadcrumbs and body links to the canonical addresses. Keep campaign tracking on links in emails and adverts, not on links between your own pages. Where filter or sort parameters create near-identical pages, keep their canonical pointing at the unfiltered page.
Step 6
Retest with curl and URL Inspection
Repeat the curl checks on a sample of pages from each template and confirm every variant redirects once and every canonical matches the final address. In Search Console, inspect the same pages and check the Google-selected canonical now matches yours; this can take time to update after recrawling. Run the Agent Readiness Audit again and confirm the canonical conflict findings have cleared for those templates.
Stopping conflicts coming back
- One source of truth in templates. Build the canonical tag, og:url, JSON-LD url and hreflang addresses from the same variable in code, never typed separately.
- Test redirects after infrastructure changes. Moving host, adding a CDN or changing SSL settings is when chains and loops appear. Keep a short list of variants to curl after each change.
- Check new plugins and apps. Anything that outputs head tags may add a second canonical. View the source after installing.
- Keep links in content clean. Editors often paste addresses copied from the browser,
complete with tracking parameters. A periodic search for
utm_in your content catches them. - Plan migrations properly. Moving URLs is its own project with its own risks; the canonical migration guide covers redirect maps and checks.
1. Do AI crawlers respect rel=canonical?
The major AI companies publish little about how their crawlers handle canonical tags, so it is safest not to rely on the tag alone. Some systems may consolidate duplicates the way search engines do; others may treat each address they fetch as a separate page. Redirects avoid the question, because a crawler following a redirect never receives the duplicate. Use redirects for host, protocol and slash variants, and keep canonical tags for cases such as tracking parameters where a redirect is not practical.
2. Should I use a 301 or a 308 redirect?
Both are permanent redirects. The difference is that a 308 requires the client to repeat the same request method, so a form submitted with POST stays a POST, whereas a 301 historically allowed clients to switch to GET. For ordinary page addresses that people and crawlers request with GET, either works and search engines treat them the same way. Use whichever your server or CDN offers by default, and make sure it is permanent rather than a temporary 302 or 307.
3. Is a trailing slash or no trailing slash better?
Neither is better. What matters is choosing one form and applying it everywhere: redirects, canonical tags, sitemap entries and internal links. Many content management systems have a default, and it is usually easier to keep it than to fight it. The problem the audit reports is not the slash itself but the page answering with a 200 at both forms, or the canonical tag, sitemap and internal links each using a different form for the same page.
4. Why does Search Console show a different Google-selected canonical?
Google treats your canonical tag as a strong hint, not an instruction, and weighs it against other signals such as redirects, internal links, sitemap entries and whether the pages really are duplicates. When those signals point elsewhere, Google may choose a different address. It usually means your signals disagree, for example the tag says one form while every internal link uses another. Align them, request indexing for the page, and check the report again after Google has recrawled it.
5. What should I do about tracking parameters like utm_source?
Keep them working, because campaigns rely on them, but make sure every page served with a parameter still declares the clean address in its canonical tag. Do not put parameter URLs in your sitemap or in links between your own pages. Tag only links in emails, adverts and social posts. Some analytics setups can also remove the parameter from the visible address after recording it, which stops people copying and sharing the tracked version of the link.
6. Can I canonicalise a page to a page on another domain?
Yes, a cross-domain canonical is valid when the same content genuinely exists on both sites and you control, or have agreed with, the other site. It is common when a business runs two domains with identical pages. For articles republished by partners, Google changed its guidance in 2023 and no longer recommends relying on canonical tags for syndicated copies, suggesting that partners block indexing of their copy instead. Check the current guidance before setting up syndication.
7. How many redirects in a chain is too many?
Aim for one. Every extra hop adds a request and a delay, and some clients give up after a handful of redirects. Google says it follows several hops, but other crawlers publish no limit, and a chain is always a sign that rules at different layers overlap. Build redirect rules so each variant goes straight to the final address, test with curl -sIL, and update old redirects when you move a page again so they do not stack.
The Agent Readiness Audit requests your page with real AI crawler user agents, checks robots.txt and llms.txt, reviews JSON-LD coverage and semantic HTML, tests how much depends on JavaScript and measures how easily the content can be extracted.
Open Agent Readiness Fixes โ