In short
A URL parameter is whatever follows the ?: ?utm_source=newsletter, ?sort=prix, ?page=2, ?sid=8f3a. Some of them genuinely change the content; most do not. Controlling parameters means knowing which ones exist on the site, deciding for each one whether it should be crawled and indexed, then applying that decision with the right tools: canonical, robots.txt, clean internal links, removal at the source. Once the check is done, crawlers spend their time on useful URLs and each page exists in the index under a single address.
Why it matters
Every combination of parameters is a distinct URL for a search engine. In its documentation, Google lists irrelevant parameters among the main causes of excess URLs: referral parameters, sorting, session IDs. They create duplicates that dilute signals and take up crawling at the expense of new or updated pages.
Google no longer helps you manage them from Search Console: the URL Parameters tool was retired in 2022, as Google considered that its crawlers could now spot most useless parameters on their own. The rule therefore has to be enforced on the site itself. Google also recommends a standard format: = between key and value, & between parameters, and as few parameters as possible.
The crawlers of generative engines and AI assistants also follow the links they find. A site that exposes thousands of parameterized variants shows them just as many duplicates, and none of them documents how it consolidates them. Clean URLs are the safest ground.
What it improves
- Crawling Fewer useless URLs, so more visits to the pages that matter. The effect is noticeable on sites with several thousand pages.
- Indexing A single URL per piece of content, the one you chose.
- Signal consolidation Links and shares are not scattered across variants.
- Cache Fewer variants to cache on the CDN.
- Statistics Readable per-page reports, without dozens of rows for the same page.
- Rankings Indirect effect, through consolidation.
How to check
Which parameters do crawlers come across? In the server access logs, count the parameter names requested by Googlebot:
grep -i "googlebot" /var/log/nginx/access.log \
| awk '{print $7}' | grep '?' \
| sed -E 's/^[^?]*\?//' | tr '&' '\n' | cut -d= -f1 \
| sort | uniq -c | sort -rn | head -20
The log path varies (/var/log/apache2/access.log, the host's control panel). For proper crawler verification, see analyze server logs (opens in a new tab).
Which ones are indexed or rejected? In Search Console, Page indexing report: the reasons “Alternate page with proper canonical tag” and “Duplicate without user-selected canonical” list examples of parameterized URLs. Compare the declared canonical with the Google-selected one (opens in a new tab) using URL Inspection.
Does the site create them itself? In Screaming Frog, URL tab, “Parameters” filter: every URL listed is linked from a page of the site. An internal link to ?utm_source= or ?sid= is a defect to fix.
Passing result: no internal link to a tracking or session parameter, every indexable parameterized URL is intended, and the others are either canonicalized, blocked or redirected.
How to implement
Before you start
Fill in this table, one row per parameter found. It is the deliverable of this check; the examples are fictitious.
| Parameter | Role | Changes the content? | Index? | Handling |
|---|---|---|---|---|
utm_source, utm_medium, gclid, fbclid, msclkid |
Campaign tracking | No | No | Canonical to the URL without the parameter. Never in an internal link |
sid, PHPSESSID |
Session | No | No | Remove from the URL (cookie-based session), 301-redirect old URLs |
sort, order, view, limit |
Sorting and display | Order only | No | Canonical to the unsorted list, or robots.txt block |
page |
Pagination | Yes | Yes | Self-referencing canonical. See control pagination (opens in a new tab) |
color, taille, prix |
Filters | Yes, partly | Case by case | See control filters and facets (opens in a new tab) |
q, s |
Internal search | Yes | No | See handle internal search results (opens in a new tab) |
id, article |
Content ID | Yes | Yes | Ideally, replace with a readable URL |
Common rules:
- Clean internal links: menus, breadcrumbs, sitemaps and editorial links always point to the URL without unnecessary parameters.
utm_parameters are reserved for links placed outside the site (emails, social media, ads). - Constant order: if several parameters are combined, always generate them in the same order (
?couleur=vert&taille=m, never the reverse), without duplicates. - One treatment per URL: a URL blocked by robots.txt is not crawled, so its canonical and its
noindextag are never read. Choose one or the other.
Warning: do not redirect campaign parameters to the clean URL. Analytics tools read
utm_sourceorgclidon the landing page: a server redirect that strips them loses the attribution. The canonical is enough.
Blocking with robots.txt, for sorting or display parameters that are not worth crawling. Block the parameter in first position (?) and in a following position (&), so as not to catch a parameter with a similar name:
User-agent: *
Disallow: /*?sort=
Disallow: /*&sort=
Disallow: /*?view=
Disallow: /*&view=
Disallow: /*?sid=
Disallow: /*&sid=
Test with the Search Console robots.txt report after publishing.
Canonical, in the <head> of each page, pointing to the clean URL:
<link rel="canonical" href="https://example.com/thes/the-vert/">
For implementing the canonical in each CMS, see control parameterized URLs (opens in a new tab).
Apache
Versions Apache 2.4, PHP 8.1 and later.
Strip session IDs from old URLs, in the .htaccess file or the virtual host. The trailing ? of the target clears the whole query string:
RewriteEngine On
RewriteCond %{QUERY_STRING} (^|&)(PHPSESSID|sid)= [NC]
RewriteRule ^ %{REQUEST_URI}? [R=301,L]
On the PHP side, prevent the session from being written into the URL (defaults in recent versions, to be confirmed in php.ini or the control panel):
session.use_only_cookies = 1
session.use_trans_sid = 0
Nginx
Versions Nginx 1.24 and later.
In the server block:
if ($args ~* "(^|&)(phpsessid|sid)=") {
return 301 $uri;
}
$uri does not contain the query string: the redirect removes it entirely. To strip a single parameter while keeping the others, do it in the application. Reload with sudo nginx -t && sudo systemctl reload nginx.
Cloudflare
Versions Cloudflare dashboard, all plans, November 2026.
Open Rules > Overview (direct link), create a dynamic redirect rule, status code 301, without preserving the query string:
Filter expression:
(http.host eq "example.com" and (http.request.uri.query contains "PHPSESSID=" or http.request.uri.query contains "sid="))
Target URL expression:
concat("https://", http.host, http.request.uri.path)
contains "sid=" also catches xsid=: check that no legitimate parameter contains this sequence. Fine-grained customization of the cache key per parameter (ignoring utm_source, for example) is limited to the Enterprise plan; other plans can only ignore the entire query string, which is rarely desirable.
Plesk
Versions Plesk Obsidian 18.0.
Paste the Apache block into the site's .htaccess file, or the Nginx block into Websites & Domains > your domain > Apache & nginx Settings, “Additional nginx directives” section. PHP session settings are in the domain's PHP Settings.
cPanel
Versions cPanel, Jupiter theme, November 2026.
Paste the Apache block into public_html/.htaccess. Session directives are set in Software > MultiPHP INI Editor (Editor Mode) if the host allows it.
Shared hosting
The .htaccess block from the Apache section works with most hosts. Upload the robots.txt file to the site root via FTP or the control panel's file manager.
WordPress
Versions WordPress 6.4 and later, Yoast SEO 20.4 and later, Rank Math as of November 2026.
- Canonical: WordPress outputs it on posts and pages, without parameters. Yoast SEO and Rank Math extend it to archives and categories.
- Parameter cleanup: in Yoast SEO,
Settings > Advanced > Crawl optimization, the URL cleanup section can redirect unregistered parameters to the clean URL, with a list of parameters to keep. Then test your plugins (forms, filters, block pagination?query-…-page=2, checkout), which often rely on parameters. - robots.txt: WordPress serves a virtual file. To add the sorting rules, use your SEO plugin's file editor or upload a real
robots.txtfile to the root. - Links: avoid links such as
/?p=123or/?cat=4in menus and content; use permalinks.
Shopify
Versions Online Store 2.0 themes, Shopify admin, November 2026.
- Canonical: the
<link rel="canonical" href="{{ canonical_url }}">tag inlayout/theme.liquidhandles variants;?variant=is canonicalized to the product page. - robots.txt: the default file already blocks sorted collections (
sort_by) and tag combinations (+), but notfilter.filter parameters. To add a parameter, create therobots.txt.liquidtemplate (Online Store > Themes, theme menu,Edit code, “Add a new template”, typerobots) and add the rule in the*group:
{% for group in robots.default_groups %}
{{- group.user_agent }}
{%- for rule in group.rules -%}
{{ rule }}
{%- endfor -%}
{%- if group.user_agent.value == '*' -%}
{{ 'Disallow: /*?view=*' }}
{%- endif -%}
{%- if group.sitemap != blank -%}
{{ group.sitemap }}
{%- endif -%}
{% endfor %}
Shopify warns that a mistake in this file can cause you to lose all your traffic. Compare the output of /robots.txt before and after.
PrestaShop
Versions PrestaShop 8 and 9.
In Shop Parameters > Traffic & SEO, enable friendly URLs and the redirect to the canonical URL (301). The same screen generates the robots.txt file, which already contains rules for several sorting and search parameters: regenerate it after an update and review it before publishing.
Magento
Versions Magento Open Source and Adobe Commerce 2.4.
In Stores > Configuration > Catalog > Catalog > Search Engine Optimization, set the canonical link meta tag options for categories and products to “Yes”. Display parameters (product_list_order, product_list_dir, product_list_limit, product_list_mode) are blocked in Content > Design > Configuration, store view, “Search Engine Robots” section, custom instructions field of robots.txt. These labels are those of the English admin.
Laravel
Versions Laravel 11 to 13.
Output a canonical without the query string, keeping only the parameters that change the content:
@php
$canonical = url()->current();
$page = (int) request()->query('page', 1);
if ($page > 1) {
$canonical = "{$canonical}?page={$page}";
}
@endphp
<link rel="canonical" href="{{ $canonical }}">
url()->current() returns the URL without parameters. Generate links with route() rather than copying request()->fullUrl(), which would carry over tracking parameters.
Next.js
Versions Next.js 15 and 16 (App Router).
Declare the canonical in the metadata; it never contains searchParams unless you explicitly choose so:
// app/thes/[categorie]/page.tsx
import type { Metadata } from 'next';
export async function generateMetadata({ params }: { params: Promise<{ categorie: string }> }): Promise<Metadata> {
const { categorie } = await params;
return {
alternates: { canonical: `/thes/${categorie}/` },
};
}
Set metadataBase in the root layout so that the URL is absolute. Internal <Link> links must not propagate tracking searchParams.
Common mistakes
utm_parameters in internal links: banners, menus or promotional blocks tagged for analytics create duplicates and skew traffic sources.- Blocking in robots.txt and setting a canonical: the canonical is never read. One treatment per URL.
- Blocking parameters that carry unique content: the
?id=123of a product page, or pagination, and entire pages drop out of crawling. - Redirecting campaign parameters: attribution is lost in analytics tools.
- Variable parameter order:
?a=1&b=2and?b=2&a=1are two URLs. - Overly broad robots.txt rule:
Disallow: /*sortalso blocks/assortiment/. - Relying on Google to guess: it spots many useless parameters, but not necessarily those of your CMS, and other search engines or AI crawlers do not do as much.
Frequently asked questions
Does the Search Console URL Parameters tool still exist?
No. Google retired the URL Parameters tool from Search Console in 2022, explaining that its crawlers could now identify most useless parameters on their own and that very few of the settings entered were useful. To stay in control, you have to act on the site: internal links without superfluous parameters, a canonical tag pointing to the clean URL, robots.txt rules for sorting or session parameters.
Do utm parameters create duplicate content?
Yes, every URL with a utm parameter is technically a distinct URL. The risk stays limited if these parameters only appear in external links and each page declares a canonical pointing to its clean URL. The real problem arises when internal links carry utm parameters: crawlers explore them at scale and your analytics reports misattribute visits. Do not redirect them, or attribution would be lost.
Should you block parameterized URLs in robots.txt?
Only parameters that do not change the content and that crawlers explore in large numbers, such as sorting, display or sessions. Blocking prevents crawling, but a blocked URL can stay indexed without content if it gets links, and its canonical is no longer read. For a few duplicates, the canonical is enough. Never block a parameter that carries unique content, such as pagination.
How can I find out which parameters Google crawls on my site?
Analyze the server access logs: filter the Googlebot lines, extract the query string and count the parameter names. Supplement this with the Search Console Page indexing report, whose duplicate and canonical reasons list examples of parameterized URLs, and with a Screaming Frog crawl, which shows which parameters are linked from your own pages.
Resources
- Google Search Central: URL structure best practicesdevelopers.google.com
- Google Search Central: Retiring the URL Parameters tooldevelopers.google.com
- Google Search Central: Managing your crawl budgetdevelopers.google.com
- Google Search Central: How to specify a canonical URLdevelopers.google.com
- Bing: URL normalization (old feature: check whether it is still available in your Bing Webmaster Tools account)blogs.bing.com
- Shopify: Editing robots.txt.liquidhelp.shopify.com
- Cloudflare: Single Redirectsdevelopers.cloudflare.com
- Next.js: generateMetadata and alternatesnextjs.org
Updated on
Topic checklist (PDF)