Google showing an unexpected URL in search results can make it seem as if your canonical tag or redirect is being ignored. Often, Google has found several versions of the same page and selected a different one as canonical, or it has received conflicting signals about which URL should represent the content. This guide explains how to diagnose the cause and align your site’s canonical tags, parameters, redirects, links, and sitemap.
Key takeaways
- A canonical tag is a hint, not a command. Google may select a different canonical URL.
- Duplicate URLs can be created by tracking parameters, alternate hosts, protocols, trailing slashes, and other URL variations.
- Use redirects when a URL has permanently moved; use canonical tags when duplicate or similar pages should remain accessible.
- Make internal links, canonical tags, redirects, and sitemap entries consistently point to the URL you want indexed.
- Check the Google-selected canonical in Search Console’s URL Inspection tool before changing your site.
What “Google indexes the wrong URL” can mean
A page can have several addresses that serve the same or substantially similar content. For example:
https://example.com/articlehttps://www.example.com/articlehttp://example.com/articlehttps://example.com/article/https://example.com/article?utm_source=newsletter
Google may treat some of these as duplicates and select one URL as the canonical version. The canonical URL is the version Google considers most representative of a group of duplicate or similar pages. Google can show that selected URL in search results even when your page contains a different canonical declaration.
First identify the actual issue: Is the wrong URL appearing in search results, is the preferred URL missing from the index, or are both versions indexed? Those situations can have different causes and need different fixes.
Diagnose the selected URL in Search Console
Use Google Search Console’s URL Inspection tool on both the URL you want indexed and the URL appearing in results. Review the inspection details, including whether the URL is indexed and the user-declared and Google-selected canonical values, when available.
Then compare the two URLs and their responses:
- Open each URL and check whether it loads, redirects, or returns an error.
- Compare the page content, canonical tag, robots directives, and response status.
- Check whether the URL is linked from your site, listed in your sitemap, or generated by a parameter or navigation system.
- Test the preferred URL directly, rather than relying on a browser display that may hide redirects or URL differences.
Search Console reports what Google has processed at a particular time. After you make a change, Google must recrawl and process the affected URLs; a correction is not necessarily reflected immediately.
Canonical tags: tell search engines which version to prefer
For duplicate pages that should remain accessible, add a canonical link element in the page’s HTML head. A page can also declare itself as canonical.
<head>
<link rel="canonical" href="https://example.com/guides/url-cleanup" />
</head>
Use an absolute URL and make sure it points to the intended, accessible page. The canonical target should be consistent with your preferred protocol and hostname, and should not redirect to another URL or return an error.
A canonical tag does not remove the alternate page or force Google to display the declared URL. Google considers multiple signals when selecting a canonical, so conflicting signals can lead it to choose another version. Check that:
- Each duplicate page declares the same preferred canonical URL, where appropriate.
- Internal links point to the preferred URL.
- The preferred URL appears in your XML sitemap.
- The canonical target is crawlable and can be indexed.
- The page’s content is sufficiently similar to the canonical target.
Avoid adding multiple canonical tags or pointing unrelated pages to one canonical URL. A canonical is not a substitute for a redirect when visitors and crawlers should be sent to a single destination.
Parameters and duplicate URL variants
Parameters can serve different purposes. Tracking parameters such as utm_source may produce a URL that displays the same content as the unparameterized page. Other parameters can change the content, such as a product filter, language, sort order, or pagination state. Do not assume every parameter is safe to remove or every parameterized page is a duplicate.
For tracking-only variations, keep the page’s canonical pointed at the clean preferred URL when the content is equivalent. Make sure your site’s internal links do not unnecessarily promote tracked variants as the main destination. A URL cleaner can help you inspect a URL and identify parameters to review, but decide whether a parameter is removable based on how your site uses it.
For parameters that change the page’s content, decide whether those pages should be independently discoverable. If they should, give them an appropriate indexation strategy and avoid canonicalizing them to a page that does not represent their content. If they should not be indexed, use a deliberate, technically appropriate approach rather than relying on indiscriminate parameter removal.
Redirects: use them when a URL has moved
A permanent redirect is generally appropriate when you have replaced or consolidated a URL and visitors should use the new destination. Configure the redirect on the server or platform so requests to the old URL reach the intended final URL. Update internal links and sitemap entries to use the destination directly.
A redirect and a canonical tag solve related but different problems:
| Situation | Typical approach |
|---|---|
| A page permanently moved and the old URL should no longer serve it | Permanent redirect to the replacement page |
| Several accessible URLs show equivalent content | Canonical tag and consistent site signals |
| A temporary change where the original URL may return | Temporary redirect, if that matches the actual situation |
| A page has no suitable replacement | Avoid redirecting it to an unrelated page; handle its removal appropriately |
Avoid long redirect chains and loops. Redirect each obsolete URL directly to its final destination, and verify the destination returns the expected page. Do not redirect every removed URL to the homepage simply to make the old URLs resolve; an irrelevant destination can confuse visitors and search engines.
A practical troubleshooting workflow
- Choose the preferred URL. Decide on the exact scheme, hostname, path, and trailing-slash convention you intend to use.
- Inspect the affected URLs. Compare the indexed URL and preferred URL in Search Console. Check response codes, redirects, page content, canonical tags, and robots directives.
- Classify the relationship. If the old URL has been replaced, redirect it. If both URLs must remain available but represent equivalent content, use canonical signals. If the content differs, reassess whether it is actually a duplicate.
- Align site signals. Point internal links and sitemap entries to the preferred URL. Ensure canonical tags on duplicates agree with that choice.
- Check parameter handling. Separate tracking-only parameters from parameters that change page content. Preserve parameters required for the intended page.
- Verify the final response. Test the preferred URL and any redirects. Confirm there are no loops, unexpected destinations, or blocked canonical targets.
- Request reprocessing where appropriate. Use Search Console’s inspection and indexing features for important updated pages, then allow time for Google to recrawl and reassess the URLs.
This workflow is for ordinary site URL management. If your server fetches URLs supplied by users, canonical tags and URL cleanup are not SSRF protections. Network access requires separate server-side controls.
Common mistakes
- Treating canonical as a directive. Google can select a different canonical when other signals conflict or the declared target is unsuitable.
- Canonicalizing unrelated pages together. The target should represent the duplicate page’s content, not merely be the URL you prefer.
- Using a redirect and canonical strategy inconsistently. For example, redirecting a URL to one destination while its links or canonical point elsewhere sends mixed signals.
- Removing every query string. Some parameters are necessary to display the right content or state.
- Leaving old URLs in navigation or sitemaps. This can continue to signal that variants are important.
- Assuming a browser test proves what Google sees. Inspect the server response and Search Console data, including redirects and canonical declarations.
- Changing several systems without tracking the changes. Record the intended canonical, redirect mapping, and sitemap updates so you can identify which change resolved the issue.
Recommendations for site owners
Establish one consistent URL format and use it throughout your site. Keep canonical tags, internal links, redirects, and sitemap entries aligned. When consolidating URLs, map each old page to the most relevant replacement and test the final response. For parameterized URLs, document which parameters affect content and which are only for tracking.
If Google continues to select an unexpected URL, revisit the evidence rather than repeatedly changing the canonical tag. Check whether the preferred URL is accessible and indexable, whether the duplicate pages really contain equivalent content, and whether your site still links to the alternate version.
Conclusion
Google indexing an unexpected URL usually points to duplicate URL variants or inconsistent signals, not a single tag that needs to be forced. Use Search Console to compare the declared and selected canonical, choose redirects for permanent moves, use canonical tags for accessible duplicates, and align links and sitemap entries with your preferred URL. Then verify the result and allow time for recrawling.
