Duplicate URL problems are a common frustration for site owners monitoring their websites through Google Search Console (GSC). One of the most frequent cases looks like this:
https://xyz.com/web-development/
https://xyz.com/web-development/?ref=26764
Google often reports this as:
“Duplicate, Google chose different canonical than user”
or
“Duplicate, submitted URL not selected as canonical”
In this guide, you’ll learn exactly why this happens, how to fix it with proper canonical tags or redirects, and how using #
instead of ?
can prevent these issues altogether.
Why the Issue Happens
Google treats every unique URL as a separate page. The difference between these two URLs:
https://xyz.com/web-development/
https://xyz.com/web-development/?ref=26764
is the ?ref=26764
parameter. Even though it doesn’t change the page content, it makes Google think a second page exists, resulting in duplicate content and canonical confusion.
If both pages have self-referencing canonical tags (each pointing to itself), Google sees two equal versions of the same content and must pick one to index. This leads to duplicate warnings in Search Console.
What You’ll See in Google Search Console
You’ll find the issue under Indexing → Pages → Why pages aren’t indexed with one of these messages:
Status | What It Means | Action Needed |
---|---|---|
Duplicate, Google chose different canonical than user | Both URLs exist and self-canonicalize. Google chooses one and flags the other. | Fix canonical conflict. |
Alternate page with proper canonical tag | Canonical is correctly set – Google knows the main version. | Correct, no action needed. |
Duplicate, submitted URL not selected as canonical | The parameter version is in your sitemap. | Remove non-canonical URLs from sitemap. |
Example: Before the Fix
Canonical Page
https://xyz.com/web-development
<link rel="canonical" href="https://xyz.com/web-development/" />
Duplicate Page
https://xyz.com/web-development/?ref=26764
<link rel="canonical" href="https://xyz.com/web-development/?ref=26764" />
Result: Both pages claim to be canonical, both have the same content → GSC flags it as a duplicate.
Step-by-Step Fix
1. Use a Single Canonical URL
Make sure both pages point to the same canonical version.
Correct Setup:
<link rel="canonical" href="https://xyz.com/web-development/" />
Now both /web-development/
and /web-development/?ref=26764
tell Google that the main version is /web-development/
.
2. (Recommended) Redirect Tracking Parameters
If the ref
parameter is used for analytics or referral tracking only, add a 301 redirect so visitors and bots are always sent to the clean URL.
Apache (.htaccess):
RewriteCond %{QUERY_STRING} (^|&)ref=[^&]+ [NC]
RewriteRule ^web-development/$ /web-development/? [R=301,L]
Nginx:
if ($arg_ref) {
return 301 https://$host/web-development/;
}
Redirects consolidate SEO signals and prevent duplicate pages from being indexed.
3. Replace “?” with “#” for Non-Critical Parameters
This is a simple but powerful trick.
Instead of using query parameters like ?ref=26764
, use fragment identifiers like #ref=26764
.
For example:
https://xyz.com/web-development/#ref=26764
Why This Works
The #
(hash or fragment identifier) is handled client-side. It’s only visible to browsers, not servers or search engines.
- Google treats everything after
#
as the same page, not a separate URL. - It does not trigger a new crawl or index entry.
- The content and canonical tag stay the same, eliminating duplication.
This means:
https://xyz.com/web-development/
and
https://xyz.com/web-development/#ref=26764
are considered the same page by Google.
When to Use the #
Method
Use it only for:
- Simple tracking (like referral IDs or campaign tags that don’t affect page content).
- Client-side scripts or analytics tracking.
Avoid it if:
- Your website’s content changes dynamically based on the parameter (e.g., filtering, sorting, pagination).
Because fragments aren’t sent to the server, they can’t be used to deliver unique content or identify server-side actions.
4. Update Sitemap and Internal Links
Your XML sitemap should include only canonical URLs, without any parameters or hashes.
Correct:
https://xyz.com/web-development/
Avoid:
https://xyz.com/web-development/?ref=26764
https://xyz.com/web-development/#ref=26764
Also, ensure that all internal links in navigation, CTAs, or blog posts point to the canonical version.
5. Request Reindexing in Google Search Console
After updating your canonical tags or replacing parameters with #
:
- Go to URL Inspection in GSC.
- Inspect both URLs.
- Click Request Indexing for the clean page (
/web-development/
).
Google will recrawl and reprocess your canonical signals within a few days to weeks.
Expected Results After Fix
URL | Indexed? | Canonical Recognized by Google | Status in GSC |
---|---|---|---|
https://xyz.com/web-development/ | Yes | Self | Indexed |
https://xyz.com/web-development/?ref=26764 | No | /web-development/ | “Alternate page with proper canonical tag” |
https://xyz.com/web-development/#ref=26764 | Yes | Same as clean | Treated as same page |
By using #
instead of ?
, you ensure that tracking or referral variations don’t create duplicate URLs in Google’s index.
SEO Benefits of Fixing Canonical Issues
- Prevents duplicate content penalties
- Consolidates link equity
- Improves crawl efficiency
- Maintains consistent canonical signals
- Keeps analytics clean and more accurate
Conclusion
The “duplicate page with self canonical issue” appears when parameterized URLs like https://xyz.com/web-development/?ref=26764
confuse Google into thinking multiple pages exist with the same content.
The best solutions are:
- Add a proper canonical tag pointing to the clean URL.
- Use 301 redirects to consolidate parameter versions.
- Replace
?ref=
with#ref=
for non-critical tracking to avoid creating separate URLs. - Keep your sitemap and internal links clean.
- Request reindexing in Google Search Console.
Using a #
fragment instead of ?
is an elegant, SEO-safe way to pass referral or campaign data without generating duplicate URLs, making it one of the simplest and most reliable fixes for self-canonical issues in Google Search Console.