# Control parameterized URLs

- Check 04.16 · Indexing and canonicalization · Critical
- Source: https://checklist-seo-geo.com/en/indexing-canonicalization/control-parameterized-urls
- Inventory your site's URL parameters, choose for each one between canonical, noindex, robots.txt blocking or 404, and apply the rule on your server, CDN or CMS.
- Updated on 2026-11-25
- Licence: CC BY 4.0. Credit “Checklist SEO & GEO” with a link to https://checklist-seo-geo.com/en/indexing-canonicalization/control-parameterized-urls.
- Plugin checklist-seo-geo: 1.3.1 · https://github.com/maximegaul/checklist-seo-geo

## In short

A parameterized URL carries a query string after the `?`: `?tri=prix`, `?utm_source=newsletter`, `?couleur=vert&taille=m`. Some parameters change the content, others do not. The task is to list the ones crawlers actually encounter, set a treatment for each (indexable, canonical, `noindex`, crawling blocked, 404) and apply it. Once this is done, only useful parameterized URLs can enter the index, and crawlers no longer wear themselves out on endless combinations.

## Why it matters

For a search engine, `/thes/` and `/thes/?tri=prix` are two distinct URLs. Each added parameter multiplies the number of possible addresses: three combinable filters with ten values each, plus a sort order and pagination, produce thousands of URLs for a single category. Google cites this additive filtering, irrelevant parameters (tracking, sorting, session IDs) and generated calendars as the main causes of an abnormally high number of URLs.

The consequences:

- **Diverted crawling**: the crawler spends its time on variants and comes back less often to the pages that matter. See [optimize crawl budget if warranted](https://checklist-seo-geo.com/en/crawling/optimize-crawl-budget-if-warranted).
- **Duplicates in the index**: sorted or tracked URLs sometimes replace the clean URL in the results.
- **Empty pages indexed**: a filter combination with no products responds 200 with an empty list, which Google may treat as a soft 404.

In April 2022, Google retired the "URL Parameters" tool from Search Console, considering that its crawlers can identify useless parameters on their own. Control therefore lies entirely with the site: links, canonical, robots.txt, HTTP status codes.

## What it improves

- **Crawling**: fewer requests wasted on variants, especially for catalogs and sites with filters. A negligible effect on a small brochure site.
- **Indexing**: the clean URL is the one shown, not its sorted or tracked variant.
- **Reports**: less noise in the Page indexing report and in the crawl stats.
- **Server**: fewer list pages generated for crawlers, so less load.
- **Rankings**: an indirect effect, through consolidating signals on the reference URL.

## How to check

**1. List the parameters encountered.** Three sources complement each other:

- **Search Console**: in the [Page indexing report](https://search.google.com/search-console/index), open the reasons "Crawled - currently not indexed", "Discovered - currently not indexed" and "Duplicate without user-selected canonical", then export the examples (1,000 rows at most). The [Crawl stats](https://search.google.com/search-console/settings/crawl-stats) show examples of crawled URLs.
- **Server logs**: the most complete source. Count the parameter names requested by Googlebot:

```bash
grep -i "googlebot" /var/log/nginx/access.log \
  | awk '{print $7}' | grep "?" | sed 's/.*?//' | tr '&' '\n' | cut -d= -f1 \
  | sort | uniq -c | sort -rn | head -30
```

Verify that the Googlebot visits are genuine before drawing conclusions; see [analyze server logs](https://checklist-seo-geo.com/en/crawling/analyze-server-logs).

- **Crawl**: in Screaming Frog, the `URL` tab with the `Parameters` filter lists parameterized URLs discovered through links.

**2. Check how each parameter is handled.** For a representative URL:

```bash
curl -s https://example.com/thes/?tri=prix | grep -i -o '<link[^>]*rel="canonical"[^>]*>'
curl -sI https://example.com/thes/?tri=prix | grep -i -E "^(HTTP|x-robots-tag)"
```

Expected result for a sort order: `200`, canonical to `https://example.com/thes/`. For an empty combination: `404`. The [URL Inspection tool](https://search.google.com/search-console?action=inspect) shows, in the "Crawl allowed?" field, whether robots.txt blocks a URL; the robots.txt report (`Settings > robots.txt`) shows the version of the file Google has read.

## How to implement

### Before you start

Fill in a table with one row per parameter. This is the deliverable of the task, to be kept with the technical documentation:

| Parameter | Example | Changes the content? | Search value? | Chosen treatment |
|---|---|---|---|---|
| `utm_*`, `gclid`, `fbclid` | `?utm_source=newsletter` | No | No | Canonical to the clean URL; never in internal links |
| `sessionid`, `sid` | `?sid=6EE2BF1A` | No | No | Move to a cookie; canonical in the meantime |
| `tri`, `order` | `?tri=prix` | Order only | No | Canonical to the unsorted list; robots.txt blocking if the volume explodes |
| `page` | `?page=2` | Yes | Yes | Indexable, self-referencing canonical. See [pagination](https://checklist-seo-geo.com/en/architecture-navigation/control-pagination-infinite-scroll) |
| High-demand filter | `?couleur=vert` for "green tea" | Yes | Yes | Dedicated page with a clean URL (`/thes/the-vert/`) rather than a parameter |
| Other filters | `?prix=10-20&origine=japon` | Yes | No | robots.txt blocking; 404 for empty combinations |
| Internal search | `?s=matcha` | Yes | No | `noindex` or blocking. See [internal search results](https://checklist-seo-geo.com/en/indexing-canonicalization/handle-internal-search-results-no-seo-value) |
| Language | `?lang=en` | Yes | Yes | Separate URLs per language and hreflang |

Decision rules:

1. **The parameter does not change the content**: canonical to the URL without the parameter, and no internal link to the variant. Do not redirect tracking parameters: the redirect strips them before the analytics tool reads them.
2. **It changes the content with no search interest**: block crawling in robots.txt. According to Google, this is the most effective method for facets. The canonical and `nofollow` reduce crawling more slowly.
3. **It changes the content and meets real demand**: give it a clean, stable URL, linked from the menu, with its own title. See [control filters and facets](https://checklist-seo-geo.com/en/architecture-navigation/control-filters-facets).
4. **A combination returns no results or makes no sense**: respond 404 on the requested URL, without redirecting to a generic error page.

> **Warning:** do not combine robots.txt blocking and `noindex` on the same URLs. A blocked URL is not crawled: Google never sees its `noindex` or its canonical, and may index it without content if links point to it. Choose: `noindex` or canonical to get the URLs out of the index, then blocking only once they are out, if crawling is still a problem.

Keep the standard `?key=value&key2=value2` form. Commas, semicolons or brackets used as separators are often misunderstood by crawlers. Set a fixed parameter order in generated links, so that a given selection exists at only one URL.

### Robots.txt

The `/robots.txt` file is the same whatever the server. Google and Bing understand the `*` and `$` wildcards. Example for a store:

```txt
User-agent: *
Disallow: /*?*tri=
Disallow: /*?*order=
Disallow: /*?*prix=
Disallow: /*?*origine=
Disallow: /*?*sid=
Disallow: /*?s=
Disallow: /recherche

Sitemap: https://example.com/sitemap.xml
```

`/*?*tri=` blocks any URL whose query string contains `tri=`, in first position or after another parameter. Before publishing, test each rule on a URL to keep (`/thes/?page=2`) and a URL to block. See [check robots.txt access and syntax](https://checklist-seo-geo.com/en/crawling/check-robotstxt-access-syntax).

### Apache

Versions: Apache 2.4.

Send an `X-Robots-Tag` to sort and search URLs without touching the application code (Apache 2.4, `mod_headers` enabled, in the virtual host or `.htaccess`):

```apache
<IfModule mod_headers.c>
    <If "%{QUERY_STRING} =~ /(^|&)(tri|order|s)=/">
        Header set X-Robots-Tag "noindex, follow"
    </If>
</IfModule>
```

To remove a session ID inherited from an old application, redirect to the URL without the query string:

```apache
RewriteEngine On
RewriteCond %{QUERY_STRING} (^|&)sid= [NC]
RewriteRule ^ %{REQUEST_URI}? [R=301,L]
```

The trailing `?` in the target empties the query string. Only apply this rule to a parameter used on its own: it also removes the URL's other parameters.

### Nginx

Versions: Nginx 1.24 and later; `add_header_inherit` from 1.29.3.

In the `http` context:

```nginx
map $args $robots_parametres {
    default "";
    "~(^|&)(tri|order|s)=" "noindex, follow";
}
```

In the `server` block:

```nginx
add_header X-Robots-Tag $robots_parametres;

if ($args ~* "(^|&)sid=") {
    return 301 $uri;
}
```

Nginx does not send the header when the value is empty. If a `location` block contains its own `add_header` directives, repeat this line there, or, from Nginx 1.29.3, add `add_header_inherit merge;` to the `server` block. Reload with `sudo nginx -t && sudo systemctl reload nginx`.

### Cloudflare

Versions: Cloudflare dashboard, Transform Rules, all plans, November 2026.

Add the header at the edge without changing the origin: from the [rules overview](https://dash.cloudflare.com/?to=/:account/:zone/rules/overview), `Create rule > Response Header Transform Rule`, custom filter expression:

```txt
(http.host eq "example.com" and (http.request.uri.query contains "tri=" or http.request.uri.query contains "order=" or http.request.uri.query contains "s="))
```

Operation `Set static`, name `X-Robots-Tag`, value `noindex, follow`, then `Deploy`. The `contains "s="` test also catches `ids=` or `pages=`: refine it with the expression editor if your parameters look alike. robots.txt is still served by the origin, unless you manage it in Cloudflare.

### AWS

Versions: Amazon CloudFront console and CloudFront Functions (`cloudfront-js-2.0` runtime), November 2026.

On **CloudFront**, the cache policy should include in the cache key only the parameters that change the content, which limits load on the origin but changes nothing for search engines. For the `X-Robots-Tag` header, create a function in `CloudFront > Functions` (`cloudfront-js-2.0` runtime), publish it, then associate it with the `Viewer response` event of the relevant behavior:

```js
function handler(event) {
    var response = event.response;
    var query = event.request.querystring;

    if (query.tri || query.order || query.s) {
        response.headers['x-robots-tag'] = { value: 'noindex, follow' };
    }

    return response;
}
```

### Shared hosting

On Plesk, cPanel or Apache or LiteSpeed shared hosting, put robots.txt at the root (`httpdocs` or `public_html`) and paste the `X-Robots-Tag` block from the Apache section into `.htaccess`. If the host does not allow `<If>`, handle the `noindex` in the application or the CMS.

### WordPress

Versions: WordPress 6.4 to 7.1, WooCommerce 9 and 10; Yoast SEO 20 and later or Rank Math 1.0.x.

- **Internal search** (`?s=`): Yoast SEO and Rank Math set it to `noindex` by default.
- **WooCommerce**: sort orders (`?orderby=`), filters (`?filter_…`, `?min_price=`) and add-to-cart links (`?add-to-cart=`) create thousands of URLs. Block them in robots.txt, which Yoast SEO (`Tools > File editor`) and Rank Math (General Settings, "Edit robots.txt") let you edit.
- **URL cleanup**: in `Yoast SEO > Settings > Advanced > Crawl optimization`, Yoast SEO offers an option that redirects URLs carrying unregistered parameters. Test it on staging: it can break plugins that use their own parameters.

### Shopify

Versions: Online Store 2.0 themes, all Shopify plans, November 2026.

Shopify generates a default robots.txt that already covers some sort orders and search; open `example.com/robots.txt` to see its rules. To add rules, create the `robots.txt.liquid` template (`Online Store > Themes > Edit code > Add a new template`) and keep the loop over the default rules:

```liquid
{% for group in robots.default_groups %}
  {{- group.user_agent }}

  {%- for rule in group.rules -%}
    {{ rule }}
  {%- endfor -%}

  {%- if group.user_agent.value == '*' -%}
    {{ 'Disallow: /*?*filter.p.*' }}
  {%- endif -%}

  {%- if group.sitemap != blank -%}
    {{ group.sitemap }}
  {%- endif -%}
{% endfor %}
```

Shopify collection filters use `filter.p.` and `filter.v.` parameters: adapt the rule to the ones you want to exclude, and compare the published file with the original version.

### PrestaShop

Versions: PrestaShop 8 and 9, `ps_facetedsearch` faceted navigation module.

Faceted navigation adds a `q=` parameter to categories. The robots.txt generated by PrestaShop (`Shop Parameters > Traffic & SEO`, robots.txt file generation button) already blocks several sort and search parameters: reread it after generation, then add `Disallow: /*?*q=` if your facets have no dedicated page. The faceted search module also lets you make certain filters indexable with a clean URL.

### Magento

Versions: Magento Open Source and Adobe Commerce 2.4.6 to 2.4.9.

Layered navigation filters and sort orders (`?product_list_order=`, `?product_list_limit=`) are handled by core. Enable the category canonical in `Stores > Configuration > Catalog > Catalog > Search Engine Optimization`: sorted variants then point to the category. Block sort orders and filters with no value in robots.txt, which you can edit in `Content > Design > Configuration`, Search Engine Robots section.

### Laravel

Versions: Laravel 10 to 13.

Compute the canonical without the query string and add the `noindex` in a middleware:

```php
namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;

class NoindexParametresSansValeur
{
    private const PARAMETRES = ['tri', 'order', 's'];

    public function handle(Request $request, Closure $next): Response
    {
        $response = $next($request);

        if (! $request->hasAny(self::PARAMETRES)) {
            return $response;
        }

        $response->headers->set('X-Robots-Tag', 'noindex, follow');

        return $response;
    }
}
```

In the template, use `<link rel="canonical" href="{{ url()->current() }}">`, which ignores the query string. Keep `?page=` out of the list. Only the middleware registration changes depending on the version.

#### Laravel 11 to 13

In `bootstrap/app.php`:

```php
->withMiddleware(function (Middleware $middleware): void {
    $middleware->web(append: [
        \App\Http\Middleware\NoindexParametresSansValeur::class,
    ]);
})
```

#### Laravel 10

In `app/Http/Kernel.php`, add the class at the end of the `web` group in the `$middlewareGroups` property:

```php
protected $middlewareGroups = [
    'web' => [
        // existing middleware…
        \App\Http\Middleware\NoindexParametresSansValeur::class,
    ],
];
```

### Next.js

Versions: Next.js 15 and 16 (App Router).

Do not read `searchParams` to build the canonical: declare the path alone in `alternates.canonical`, with `metadataBase` defined in `app/layout.tsx`. For robots.txt, generate it with `app/robots.ts`:

```ts
import type { MetadataRoute } from 'next';

export default function robots(): MetadataRoute.Robots {
  return {
    rules: {
      userAgent: '*',
      disallow: ['/*?*tri=', '/*?*order=', '/recherche'],
    },
    sitemap: 'https://example.com/sitemap.xml',
  };
}
```

## Common mistakes

- **Blocking tracking parameters in robots.txt**: external links to `?utm_…` no longer pass anything to the page, and the URL may be indexed without content. A canonical is enough.
- **Linking internally to parameterized URLs**: a menu or breadcrumb that adds `?ref=menu` creates the variant on every page.
- **Blocking `?page=`**: products on pages 2 and beyond are no longer discovered.
- **Responding 200 to empty combinations**: they end up as soft 404s or as thin indexed pages.
- **Changing the parameter order depending on the click**: `?couleur=vert&taille=m` and `?taille=m&couleur=vert` become two URLs.
- **Relying on a setting in the search engine**: Google's tool no longer exists. Bing Webmaster Tools long offered a setting to ignore parameters; even if it is present in your interface, it only applies to Bing.

## Frequently asked questions

### Do UTM parameters create duplicate content?

Yes, a URL with UTM parameters is technically a different URL from the clean page, and Google may discover it through an external link or a share. This is not a problem if the page carries a canonical to the URL without parameters and your internal links never use UTMs. Do not block these parameters in robots.txt or strip them with a redirect, or you will lose attribution in your analytics tool.

### Should parameterized URLs be blocked in robots.txt?

Block in robots.txt the parameters that change the content with no search interest, such as sort orders and combined filters: it is the most effective way to keep crawlers from getting lost in them. Do not block tracking parameters or pagination. And if parameterized URLs are already indexed, let Google crawl them long enough to read their noindex or canonical, then block them.

### What happened to the Search Console URL Parameters tool?

Google retired the Search Console URL Parameters tool at the end of April 2022. Google found that very few of the settings entered were useful and that its crawlers could identify parameters with no effect on their own. There is no replacement in Search Console: control goes through internal links, the canonical tag, robots.txt and correct HTTP status codes on the site itself.

### Can a filtered page be indexed?

Yes, a filtered page can be indexed if it meets real search demand, for example "loose organic green tea". In that case, give it a clean, stable URL rather than a combination of parameters, a dedicated title and introduction, and link to it from the navigation. Other filter combinations, with no demand or distinct content, are better kept out of the index and, if there are many of them, out of crawling.

## Resources

- [Google Search Central: Managing crawling of faceted navigation URLs](https://developers.google.com/search/docs/crawling-indexing/crawling-managing-faceted-navigation)
- [Google Search Central: URL structure](https://developers.google.com/search/docs/crawling-indexing/url-structure)
- [Google Search Central: Retiring the URL Parameters tool](https://developers.google.com/search/blog/2022/03/url-parameters-tool-deprecated)
- [Google Search Central: Create a robots.txt file](https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt)
- [Cloudflare: Response header transform rules](https://developers.cloudflare.com/rules/transform/response-header-modification/)
- [Shopify: Customize robots.txt.liquid](https://shopify.dev/docs/storefronts/themes/seo/robots-txt)

Next steps: [Standardize HTTP/HTTPS and www/non-www](https://checklist-seo-geo.com/en/indexing-canonicalization/standardize-http-https-www-non-www) and [Control indexing of facets and internal search](https://checklist-seo-geo.com/en/e-commerce-seo/control-indexing-facets-internal-search).
