# Identify crawler traps

- Check 03.15 · Crawling · Critical
- Source: https://checklist-seo-geo.com/en/crawling/identify-crawler-traps
- Find crawler traps (combined filters, calendars, session IDs, relative links) in a crawl, your logs and Search Console, then neutralize them.
- Updated on 2026-11-25
- Licence: CC BY 4.0. Credit “Checklist SEO & GEO” with a link to https://checklist-seo-geo.com/en/crawling/identify-crawler-traps.
- Plugin checklist-seo-geo: 1.3.1 · https://github.com/maximegaul/checklist-seo-geo

## In short

A crawler trap is an area of the site that generates an almost endless number of URLs: filter combinations, calendars you can browse forever, session IDs in the URL, relative links that stack up directories. Crawlers get bogged down in them and crawl thousands of worthless addresses instead of your useful pages. This check consists of finding these areas in a crawl, in your logs and in Search Console, classifying them, then closing them at the source. Expected result: a list of trap URL patterns, each tied to a fix that has been applied.

## Why it matters

Crawlers discover URLs by following links. If a page dynamically generates new ones on every visit, the crawler has no way of knowing where to stop. Google describes these cases in its documentation on URL structure: additive filters, parameters unrelated to the content (sorting, referrer, session), calendars that link to past and future dates without limit, broken relative links that create infinite spaces when the server returns 200 instead of 404.

The cost is twofold. Crawlers spend their crawl time on duplicates, and Google states that these superfluous URLs can prevent it from indexing all of a site's content. The server, for its part, computes pages no one will read. AI crawlers, which often crawl less selectively, add to the load.

A trap has a recognizable signature: a URL pattern that comes back thousands of times with variations, a number of discovered URLs out of proportion with the real size of the site, or the same content served under different addresses.

## What it improves

- **Crawling**: crawlers spend their time on the pages that matter. This is the main effect, noticeable mostly on sites with several thousand pages.
- **Indexing**: fewer duplicates and fewer “Discovered – currently not indexed” URLs in Search Console.
- **Server load**: fewer useless requests, from search engines as well as AI crawlers.
- **Data quality**: crawl reports and crawl stats that are readable, not drowned in variants.
- **Rankings**: no direct effect. Removing a trap does not improve a page; it helps the right pages get crawled and refreshed.

## How to check

Three sources complement each other. In a few minutes, start with the logs if you have access to them: they show what crawlers actually do.

**Parameters most crawled by Googlebot:**

```bash
grep -i "googlebot" /var/log/nginx/access.log | awk '{print $7}' \
  | grep -o '[?&][^=&]*=' | tr -d '?&=' | sort | uniq -c | sort -rn | head -20
```

A sorting, session or tracking parameter at the top of the list is a warning sign.

**Share of requests with parameters:**

```bash
grep -i "googlebot" /var/log/nginx/access.log \
  | awk '{t++; if ($7 ~ /\?/) q++} END {printf "%d requests, %d with parameters (%.0f%%)\n", t, q, 100*q/t}'
```

**Repeated directories in the path** (the signature of broken relative links):

```bash
grep -i "googlebot" /var/log/nginx/access.log \
  | awk '{split($7,u,"?"); n=split(u[1],p,"/"); delete c; for (i=2; i<=n; i++) if (p[i] != "" && ++c[p[i]] == 2) { print $7; break }}' \
  | head -20
```

Healthy result: most requests go to URLs without parameters or with parameters you intended, and there is no URL like `/blog/blog/blog/article`.

Without access to the logs, open the Search Console [Crawl stats](https://search.google.com/search-console/settings/crawl-stats) report and click “OK (200)”: the example URLs often reveal trap patterns. See [analyze crawl stats](https://checklist-seo-geo.com/en/crawling/analyze-crawl-stats).

## How to implement

### Step 1 — Crawl with safeguards

An unlimited crawl falls into the trap just like a crawler and never finishes. In Screaming Frog, open `Configuration > Spider > Limits` and set:

- a maximum crawl depth (for example 10);
- a maximum number of parameters per URL (`Limit Number of Query Strings`, for example 2);
- a maximum URL length and a maximum folder depth.

Run the crawl, then sort the URLs by length, number of parameters and depth. Export the URLs that hit the limits: these are your candidates. The free version, limited to 500 URLs, is enough to spot patterns on a small site. On a larger site, the growth in the number of URLs discovered during the crawl is a clue in itself: a 2,000-page site that goes past 50,000 URLs contains a trap.

### Step 2 — Compare with the logs and Search Console

The crawl shows what is reachable; the logs show what crawlers actually crawl. For each candidate pattern, count crawler requests over a one-month period. The full method is detailed in [analyze server logs](https://checklist-seo-geo.com/en/crawling/analyze-server-logs).

In Search Console, the [Page indexing](https://search.google.com/search-console/index) report completes the picture: a high volume of “Discovered – currently not indexed” or “Crawled – currently not indexed” URLs sharing a pattern often points to a trap.

### Step 3 — Classify the traps

Keep a table, one row per pattern:

| URL pattern | Trap type | Crawler requests / month | Link source | Chosen fix |
| --- | --- | --- | --- | --- |
| `/chaussures?couleur=*&taille=*&tri=*` | combined filters and sorting | 48,000 | faceted navigation | robots.txt on `tri=`, 404 for empty combinations |
| `/agenda/2031/05` | infinite calendar | 12,500 | “next month” links | link removed beyond 12 months, 404 out of range |
| `/*?sessionid=*` | session ID | 9,200 | legacy application | session in a cookie, 301 redirect to the clean URL |
| `/blog/blog/article` | broken relative link | 3,100 | article template | root-relative link, 404 on the invalid path |
| `/recherche?q=*` | internal search | 2,400 | “popular searches” links | robots.txt, links removed |

Types to look for systematically:

| Type | Signature | Root fix |
| --- | --- | --- |
| Combinable filters and facets | several parameters, in varying order | limit the crawlable combinations; see [control filters and facets](https://checklist-seo-geo.com/en/architecture-navigation/control-filters-facets) |
| Sorting, display, pagination by parameter | `tri=`, `ordre=`, `vue=`, `par_page=` | robots.txt; sorting links without a distinct URL |
| Session or tracking IDs | `sid=`, `sessionid=`, `PHPSESSID=`, `utm_*` in internal links | session in a cookie, clean internal links |
| Calendars and date archives | very distant years | limit navigation, 404 out of range |
| Broken relative links | repeated directories | root-relative links (`/blog/article`) |
| Empty pages served with 200 | filters with no results, pagination beyond the last page | return 404; see [fix soft 404s](https://checklist-seo-geo.com/en/indexing-canonicalization/fix-soft-404s) |
| Linked internal search | `?q=`, `?s=` | see [handle internal search results with no SEO value](https://checklist-seo-geo.com/en/indexing-canonicalization/handle-internal-search-results-no-seo-value) |

### Step 4 — Fix in the right order

1. **Remove the source**: remove the link that creates the variant, or make the URL invalid with a 404. This is the only lasting fix.
2. **Block crawling** in robots.txt when the URL must remain accessible to visitors. Google cites robots.txt as the way to block dynamic URLs, calendars, sorting and filters.
3. **Do not rely on `noindex`, `canonical` or `nofollow` to stop crawling.** Google has to crawl the page to read a `noindex`; it describes `canonical` and `nofollow` as less effective long-term solutions, and `nofollow` only works if every link to the URL carries it.

Example robots.txt rules, based on Google's documentation on facets:

```txt
User-agent: *
Disallow: /*?*tri=
Disallow: /*?*sessionid=
Disallow: /*?*par_page=
Disallow: /recherche
```

Test each pattern before publishing: a rule that is too broad can block useful pages. See [check robots.txt access and syntax](https://checklist-seo-geo.com/en/crawling/check-robotstxt-access-syntax).

> **Warning:** a URL blocked in robots.txt can no longer be crawled, so any `noindex` or `canonical` it carries is no longer read. If these URLs are already indexed and you want to remove them, let the `noindex` take effect first, then block.

### Apache

Versions: Apache 2.4; `php_flag` directives with Apache's PHP module (`mod_php`) and PHP 8.3 or earlier.

Return 404 for out-of-range calendar dates, in the `.htaccess` or the virtual host:

```apache
RewriteEngine On
RewriteRule ^agenda/(19[0-9]{2}|20[0-1][0-9]|20[3-9][0-9])/ - [R=404,L]
```

Remove session IDs from URLs on the PHP side. PHP's default values already do this (`session.use_trans_sid = 0`, `session.use_only_cookies = 1`), and since PHP 8.4 changing these two settings is deprecated: on PHP 8.4 and later, simply remove any line that changes them in `php.ini`, `.htaccess` or the PHP-FPM pool. On an older version with Apache's PHP module, enforce them in `.htaccess`:

```apache
php_flag session.use_trans_sid off
php_flag session.use_only_cookies on
```

With PHP-FPM, `php_flag` is not read: set these two values in `php.ini`, then reload PHP-FPM.

Reload with `sudo apachectl configtest && sudo systemctl reload apache2`.

### Nginx

Versions: Nginx 1.18 and later.

Return 404 for paths that repeat the same directory and for absurd pagination pages, in the `server` block:

```nginx
location ~ ^/blog/blog/ {
    return 404;
}

if ($arg_page ~ "^[0-9]{4,}$") {
    return 404;
}
```

Adjust the threshold to the real number of pages, then run `sudo nginx -t && sudo systemctl reload nginx`. The root fix remains in the application: links must be root-relative.

### WordPress

Versions: WordPress 6 and 7; Yoast SEO 20.4 and later (crawl optimization).

- **Internal search**: WordPress returns 200 for any `?s=` search. Do not link to it from your pages; under `Yoast SEO > Settings > Advanced > Crawl optimization`, Yoast SEO offers options to clean up search URLs and unnecessary feeds.
- **Calendar**: the Calendar block creates date archives. Remove it if it serves no purpose.
- **Comments**: `?replytocom=` reply links duplicate posts. SEO plugins neutralize them; check in your logs that they are no longer crawled.
- **WooCommerce filters**: attribute filter widgets produce parameter combinations. Block the filter and sorting parameters (`orderby=`) in robots.txt if you do not want them indexed.

### Shopify

Versions: Shopify, all plans, November 2026.

Shopify's default robots.txt already blocks internal search, the cart and some of the sorting and combined filter URLs. The remaining traps often come from filter apps and tag links: spot them in the exported logs of your CDN or in Search Console, then add rules in the `robots.txt.liquid` template without removing the default rules.

### PrestaShop

Versions: PrestaShop 8 and 9; Faceted search module (`ps_facetedsearch`).

The faceted navigation of the Faceted search module produces combinable parameterized URLs. In the module's configuration, limit the filters offered to useful attributes. Regenerate robots.txt from `Shop Parameters > Traffic & SEO` after every structural change, then add your specific rules at the end of the file.

### Magento

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

Layered navigation generates parameters per attribute. Disable the “Use in Layered Navigation” option for attributes of no search value (`Stores > Attributes > Product`), and add to robots.txt in `Content > Design > Configuration`, store view level, “Search Engine Robots” section.

### Laravel

Versions: Laravel 10 to 13.

Validate parameters and reject anything outside the expected range, instead of serving an empty page with 200:

```php
public function show(int $year, int $month): View
{
    abort_unless($year >= now()->year - 5 && $year <= now()->year + 1, 404);
    abort_unless($month >= 1 && $month <= 12, 404);

    return view('agenda.month', [
        'events' => Event::query()->whereYear('starts_at', $year)->whereMonth('starts_at', $month)->get(),
    ]);
}
```

Generate links with `route()` or `url()`, which produce absolute URLs: no relative link can then stack up directories.

### Next.js

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

For a dynamic route, call `notFound()` as soon as a segment or parameter is invalid, and limit the pre-generated pages:

```ts
// app/agenda/[year]/[month]/page.tsx
import { notFound } from 'next/navigation';
import { Agenda } from '@/components/agenda';

export default async function Page({ params }: { params: Promise<{ year: string; month: string }> }) {
  const { year, month } = await params;
  const y = Number(year);
  const m = Number(month);
  const current = new Date().getFullYear();

  if (!Number.isInteger(y) || y < current - 5 || y > current + 1 || m < 1 || m > 12) {
    notFound();
  }

  return <Agenda year={y} month={m} />;
}
```

Use the `Link` component with absolute paths (`/blog/article`) to avoid broken relative links.

## Common mistakes

- **Crawling without limits**: the tool falls into the trap, runs out of memory and delivers no usable result.
- **Returning 200 for an empty page**: a filter with no results or a page 9,999 served with 200 invites crawlers to keep going.
- **Relying on `canonical` to stop crawling**: the URL is still crawled; only indexing is consolidated, and not always.
- **Blocking in robots.txt without removing the links**: the crawler stops crawling, but the URLs can stay indexed without content if external links point to them.
- **Writing a robots.txt rule that is too broad**: `Disallow: /*?` also blocks pagination or filters you wanted indexed.
- **Leaving tracking parameters in internal links**: every `utm_source` creates one more URL to crawl.
- **Fixing once without monitoring**: a new module or app recreates a trap. Monitor the share of parameterized URLs in the logs every month.

## Frequently asked questions

### What is a crawler trap?

A crawler trap is a part of a site that generates an almost unlimited number of URLs: filter combinations, calendars you can browse forever, session IDs in the URL or relative links that repeat directories. Search engine crawlers follow these links without knowing where to stop and crawl thousands of worthless variants, at the expense of useful pages and server load.

### How do I know whether my site contains a crawler trap?

Compare the number of discovered URLs with the real size of the site. A crawl that never finishes, a site of a few thousand pages that produces tens of thousands of URLs, or logs where Googlebot mostly crawls parameterized URLs all point to a trap. The example URLs in the Search Console Crawl stats report also help you spot repetitive patterns.

### Should I block parameterized URLs in robots.txt?

Only block parameters that do not change the useful content, such as sorting, session or display, and test each rule before publishing. Google presents robots.txt as the way to block sorting, filters, calendars and search results. Keep crawlable the filters that match real searches and that you want indexed, and fix the source of the links whenever possible.

### Is noindex enough to neutralize a crawler trap?

No, noindex does not neutralize a crawler trap, because Google has to crawl each URL to read the directive. It consolidates the index but leaves the crawler spending its time on variants. To stop crawling, remove the link that generates the URL, return a 404 error for invalid combinations, or block the pattern in robots.txt when the page must remain accessible to visitors.

## Resources

- [Google Search Central: URL structure and overly complex URLs](https://developers.google.com/search/docs/crawling-indexing/url-structure)
- [Google Search Central: Managing crawling of faceted navigation URLs](https://developers.google.com/search/docs/crawling-indexing/crawling-managing-faceted-navigation)
- [Google Search Central: Large site owner's guide to managing your crawl budget](https://developers.google.com/search/docs/crawling-indexing/large-site-managing-crawl-budget)
- [Google: Myths about crawling](https://developers.google.com/crawling/docs/myths-about-crawling)
- [Search Console Help: Crawl Stats report](https://support.google.com/webmasters/answer/9679690?hl=en)
- [Screaming Frog: Limit the number of query strings crawled](https://www.screamingfrog.co.uk/guides/limit-number-of-query-strings/)

Next steps: [avoid infinite URL spaces](https://checklist-seo-geo.com/en/architecture-navigation/avoid-infinite-url-spaces), [optimize crawl budget if warranted](https://checklist-seo-geo.com/en/crawling/optimize-crawl-budget-if-warranted) and [control URL parameters](https://checklist-seo-geo.com/en/architecture-navigation/control-url-parameters).
