Indexing and technical SEO guide
Handle Tracking Parameters and Duplicate URLs on a WordPress Site
Sort each URL parameter by whether it changes the page. Point tracking and sorting variants at the clean URL, keep them out of links and sitemaps, and treat real content changes separately.
On this page
Sort every parameter your site produces by one question: does it change what the page shows? Tracking parameters such as utm_source, gclid, and fbclid do not, so the page they land on should print a canonical naming the clean URL, and your own links and sitemap should never include them. Parameters that change the content in a way a searcher would want, such as a genuine filter someone might search for, are different pages and need their own decision. Parameters that only reorder or repeat content sit in between: consolidate them or discourage crawling.
Duplicate URLs from parameters are common and not a penalty. Google’s SEO Starter Guide, checked September 27, 2026, says content reachable under multiple URLs is inefficient but will not cause a manual action. The work is about telling search engines which address you prefer and not spending crawling on variants, not about avoiding punishment.
Classify parameter behavior with examples
List the parameters your site actually receives. Your analytics landing-page report and server access logs show real ones. Then fill in a matrix like this. The rows are common WordPress cases; check each against your own site rather than assuming.
| Parameter | Example | Changes the content? | Class |
|---|---|---|---|
| Campaign tracking | ?utm_source=newsletter |
No | Tracking |
| Ad click IDs | ?gclid=..., ?fbclid=... |
No | Tracking |
| Comment reply | ?replytocom=42 |
No, only opens the reply form | Duplicate |
| Sorting | ?orderby=date&order=asc |
Reorders the same items | Reordering |
| Internal search | ?s=pruning |
Yes, but results are generated per query | Search results |
| Plain permalinks | ?p=123, ?page_id=7 |
No, if pretty permalinks are also active | Duplicate |
| A useful filter | ?region=north on a plant directory |
Yes, a distinct list | Distinct content |
| Preview and admin | ?preview=true |
Only for signed-in users | Private |
Google’s URL structure guidance, checked September 27, 2026, names sorting parameters, referral parameters, and session IDs among the causes of unnecessarily high numbers of URLs that point to identical or similar content, and recommends cookies instead of session IDs in URLs.
Fetch pairs to confirm what a parameter does
Do not classify from the parameter name alone. A plugin can use a harmless-looking parameter to switch content. Fetch the clean and parameterized versions and compare them:
CLEAN="https://garden.example/garden-design/"
PARAM="https://garden.example/garden-design/?utm_source=newsletter"
curl -s "$CLEAN" -o clean.html
curl -s "$PARAM" -o param.html
# Compare the visible text, ignoring markup
sed 's/<[^>]*>//g' clean.html | tr -s ' \n' > clean.txt
sed 's/<[^>]*>//g' param.html | tr -s ' \n' > param.txt
diff clean.txt param.txt | head -n 40
# Compare what each version declares
grep -io '<link[^>]*rel="canonical"[^>]*>' clean.html param.html
curl -sI "$PARAM" | grep -iE '^HTTP|^location'
The URLs are illustrative. Small differences such as a nonce, a timestamp, or a cache comment are noise. A different list of items, a different heading, or different body text means the parameter changes the content.
Record the result for each parameter. The canonical line tells you what the site already declares: a tracking variant should name the clean URL, and a distinct filter page should name itself.
Choose canonical or crawling treatment
Match each class to a control. Google’s duplicate URL guidance, checked September 27, 2026, lists redirects, rel="canonical", and sitemap inclusion in order of how strongly they influence canonicalization, and says not to use robots.txt for canonicalization.
| Class | Treatment | Notes |
|---|---|---|
| Tracking | Canonical to the clean URL | Leave the URL working so campaigns still load |
| Duplicate | Canonical to the clean URL, or redirect when the variant has no use | ?replytocom is safe to redirect; with pretty permalinks, WordPress already redirects ?p= and ?page_id= to the permalink (redirect_canonical, checked September 27, 2026) |
| Reordering | Canonical to the default order, or discourage crawling of the pattern | Do not link sort variants as if they were pages |
| Search results | noindex on internal search |
Generated for any query, so no stable content |
| Distinct content | Self-referencing canonical, indexable, linked, listed | Only when the page is worth landing on |
| Private | No action for search; access control handles it | Previews should require a login |
Think before redirecting tracking parameters away. Google Analytics, for example, receives campaign values from the parameters on the link a visitor clicks, according to its campaign URL help, checked September 27, 2026. Check how your analytics tool records campaigns before stripping them with a server rule, because a redirect that removes them before the page loads can remove them from your campaign data.
For filters that multiply, such as combinations of several facets, Google’s faceted navigation guidance, checked September 27, 2026, describes overcrawling and suggests disallowing filter URLs in robots.txt when they have no search value, or using URL fragments for filtering. It describes rel="canonical" and rel="nofollow" as less effective long-term options for that job. Store filters and large crawl traps need their own plan; this guide covers ordinary sites.
WP Visibility 2.10.3 builds the canonical on posts, pages, and the first page of category, tag, author, and post type archives from WordPress’s own link for that object, so a tracking parameter on the request does not appear in the canonical. Its Strip ?replytocom comment links setting in the Indexing section, on by default, redirects reply links on single posts and pages to the post’s address. On page 2 and later of an archive, the canonical comes from WordPress’s page-number link, which is built from the current request and keeps its query string, so a parameter can carry into the canonical there. Test one with a parameter added and confirm the canonical is what you expect.
Align links, sitemaps, and responses
A canonical is one signal. It works best when everything else on the site agrees with it.
-
Internal links. Google’s duplicate URL guidance recommends linking to the canonical URL. Search your content and menus for parameters that should not be there:
wp db search 'utm_' --all-tables-with-prefix --format=count curl -s "https://garden.example/" | grep -o 'href="[^"]*?[^"]*"' | sort -uCampaign parameters belong on links you place elsewhere, such as newsletters and ads, not on links between your own pages.
-
Sitemap. List only clean, canonical URLs. Check that no sitemap entry carries a query string:
curl -sL "https://garden.example/sitemap.xml" | grep -o '<loc>[^<]*</loc>' | sed 's/<[^>]*>//g' \ | while read -r f; do curl -sL "$f" | grep -o '<loc>[^<]*?[^<]*</loc>'; doneThe loop reads the sitemap index and checks each file it lists. No output means no parameterized entries. The index and file names are in Submit Your Sitemap.
-
Responses. A distinct filter page with no results should not return an empty
200page for every combination. The faceted navigation guidance recommends returning404when a filter combination returns no results. -
Canonical owner. If a theme or second plugin prints its own canonical on parameter URLs, you can end up with two conflicting ones. Find duplicate SEO tags covers tracing the source.
Verify the policy on representative URLs
Pick one URL per parameter class and one distinct filter page if you have one. For each, record the canonical, the status code, whether it is linked internally, and whether it is in the sitemap. The policy is working when:
- tracking and duplicate variants return
200(or redirect by design) and name the clean URL as canonical; - distinct pages name themselves, are linked from a relevant page, and are listed;
- internal search results carry
noindex; - no internal link or sitemap entry carries a tracking parameter.
In Search Console, the indexed result in URL Inspection for a parameter URL that Google has crawled shows both the user-declared canonical and the Google-selected canonical (the live test shows only the user-declared one), as described in Google’s URL Inspection help, checked September 27, 2026. Google can still pick a different canonical, so treat a mismatch as a prompt to check that links and sitemaps agree, not as proof the tag failed. The URL and canonical chapter of the field guide covers choosing preferred addresses more broadly.
