Free SEO audit for new clients — claim yours
Home/Blog/Technical SEO/Spider Traps: How Infinite URL Spaces Waste Craw…
Technical SEO

Spider Traps: How Infinite URL Spaces Waste Crawl Budget

Spider Traps: How Infinite URL Spaces Waste Crawl Budget
Table of contents
  1. What makes a URL space infinite
  2. Calendars, session IDs, relative links and filters: the usual culprits
  3. Spotting traps in crawler data
  4. Reading the trap in log files and Search Console
    1. Server logs
    2. Search Console
  5. Matching the fix to the trap
    1. A robots.txt example for common traps
  6. A step-by-step clean-up for an existing trap
  7. Stopping new traps before they ship
  8. Measuring crawl improvement after the fix
  9. Questions SEOs ask about spider traps
    1. Is a spider trap a penalty risk?
    2. Should I use robots.txt or canonical tags for filter URLs?
    3. Will blocking a trap in robots.txt remove the URLs from Google's index?
    4. How do I find what is creating trap URLs?
    5. Do small sites need to worry about spider traps?
  10. Closing your site's crawl traps this quarter
  11. Further reading on spider traps
  12. Sources for this spider traps guide

Every site has a finite number of pages worth crawling. A spider trap is a part of the site that pretends otherwise: a calendar with a "next month" link that never runs out, a filter system that can stack options in any order, a relative link that adds another folder to the URL every time it is followed. To a crawler each of these looks like a fresh page, so it keeps going.

The cost is rarely dramatic on day one. It shows up as new pages taking weeks to be crawled, Search Console filling with "Crawled – currently not indexed" and duplicate URLs, server load from bots, and site audits that never finish. On large or frequently updated sites, it can mean Google spends most of its visits on URLs that should never have existed.

This guide explains the main causes of infinite URL spaces, how to find them in crawl data, log files and Search Console, which fix fits which cause, how to stop developers creating new ones, and how to measure whether your changes worked.

What makes a URL space infinite

A spider trap does not need to be literally infinite. It only needs to generate URLs faster than they add value. Google's own explanation of the problem dates back to 2008, when it described calendars and product filters as the classic examples:

“The number of possible combinations of filters can grow exponentially.”

— Google Webmaster Central Blog, To infinity and beyond? No! (August 2008)

Google's current faceted navigation documentation says the same thing in modern terms: filter systems "can generate infinite URL spaces", which leads to overcrawling and slower discovery of new content. The underlying reason is that a crawler cannot know whether a URL is useful until it fetches it.

A quick way to see the scale: a category with five filter groups of eight options each, where any number of options can be combined and the order is not normalised, produces far more URLs than there are products. Add sort order (four options) and pagination, and a 300-product category can expose tens of thousands of crawlable addresses. All of them show some subset of the same 300 products.

Google's URL structure documentation lists four common causes of excessive URLs: additive filtering of a set of items, irrelevant parameters, calendar issues and broken relative links. In practice we see a few more. This table covers the patterns and what they look like in a crawl.

TrapTypical URL patternHow it multipliesWhere it hides
Endless calendar/events/?month=2031-07"Next" link always exists, even for empty monthsEvent plugins, booking widgets, archive sidebars
Session IDs in URLs?sid=a8f3..., ;jsessionid=New ID per visit, so every crawl sees new URLsOlder ecommerce and Java platforms
Broken relative links/blog/blog/blog/post/Each follow adds a path segmentTemplates using href="blog/post" instead of /blog/post
Additive filters?color=red&size=m&color=blueEvery combination and order is a URLFaceted navigation, recipe and job indexes
Sort and view parameters?sort=price&view=gridMultiplies every listing pageCategory templates
Internal search results/search?q=Any linked query becomes a page"Popular searches" widgets, spam links
Endless pagination?page=9999Out-of-range pages return 200 with empty listsPaginated archives
Tracking or cache-busting parameters?ref=footer, ?v=1712345Internal links carry unique valuesNavigation built by marketing tools
Redirect loops between variantsA to B to ACrawler cycles without reaching contentConflicting trailing slash, locale or HTTPS rules

Internal search deserves special mention because it is easy to overlook; see our guide to internal site search pages. Faceted navigation has its own detailed treatment in our faceted navigation guide, and parameter handling generally in URL parameters and SEO.

Spotting traps in crawler data

A desktop crawler is the quickest way to reproduce a trap, because it behaves like a naive bot. Signs to watch for:

  • The crawl never finishes, or the URL count keeps climbing long after it should have plateaued.
  • Crawl depth keeps increasing. A healthy site has most pages within a few clicks. A trap shows URLs at depth 20, 50 or 200.
  • Many URLs share one title or one canonical. Hundreds of URLs titled "Events – July" is a calendar trap.
  • URL length keeps growing. Repeated path segments point to relative link problems.
  • A small set of parameters accounts for most URLs.

Practical settings: set a maximum crawl depth and a maximum number of query parameters, then run a second crawl without those limits on a sample section to see where it explodes. Export all URLs and group them by path pattern and parameter name. Our Screaming Frog guide covers the relevant settings, and Python for SEO shows how to group large URL exports by pattern. If templates hide the cause, custom extraction can pull out the link element responsible.

Remember that a crawler shows what is possible. It does not tell you what Googlebot actually does. For that you need logs.

Reading the trap in log files and Search Console

Server logs

Log files show every request Googlebot makes. Filter to verified Googlebot traffic (Google documents verification by reverse DNS, with hostnames ending in googlebot.com, google.com or googleusercontent.com, or by matching its published IP range files), then group requests by URL pattern. The question is simple: what share of Googlebot requests go to URLs you want indexed?

Log metricWhat it tells youWarning sign
Googlebot hits by URL patternWhere crawl activity is goingA parameter or folder takes a large share but has little indexed content
Unique URLs crawled per patternHow many variants Google is discoveringThousands of unique URLs under a pattern that should have dozens
Status codes by patternWhether traps return 200, 404 or 30xEmpty filters and out-of-range pages returning 200
Time from publish to first Googlebot hitDiscovery speed for new contentNew pages waiting days or weeks
Recrawl frequency of key pagesWhether important pages are refreshedMoney pages crawled less often than calendar URLs

Our log file analysis guide covers how to collect and process logs.

Search Console

Without log access, Search Console gives useful proxies:

  • Crawl Stats report: total requests, response breakdown, file types, and the split between discovery (first-time fetches) and refresh. A spike in discovery requests without a matching publishing spike suggests a new URL space. Examples of crawled URLs in each category often reveal the pattern directly. See our Crawl Stats guide.
  • Page indexing report: large counts under "Crawled – currently not indexed", "Duplicate without user-selected canonical" or "Alternate page with proper canonical tag" with parameterised examples.
  • URL Inspection: for an example trap URL, check the referring page to find the link that created it.

Matching the fix to the trap

There is no single fix. Google's documentation offers several tools, each with different strength and side effects. The most reliable approach is to stop generating the links in the first place, then use crawl controls for anything left.

FixBest forStrengthSide effects
Remove or change the link at sourceRelative links, tracking parameters, "next" links on empty monthsStrongest: no link, no URLNeeds developer time
Root-relative or absolute URLsBroken relative linksStrongNone
Cookies instead of session IDsSession parametersStrongPlatform change may be needed
robots.txt disallowFilters, sorts, internal search, calendar parametersStrong for crawlingBlocked URLs can still be indexed without content if linked; canonical signals on them are not seen
Return 404 for empty or invalid combinationsOut-of-range pagination, empty filters, duplicate filtersStrong over timeRequires app logic
rel="nofollow" on linksFuture calendar pagesModerate; every link to the URL needs itEasy to miss a link
rel="canonical"Variants you want consolidated but crawlableWeaker for crawl reductionGoogle still has to crawl to see it
noindexPages you want crawled but not indexedNot a crawl fixGoogle must crawl to see it

Google's specific advice for some of these is worth quoting directly. On sessions: "Wherever possible, avoid the use of session IDs in URLs and consider using cookies instead." On calendars:

“If your site has an infinite calendar, add a nofollow attribute to links to dynamically created future calendar pages.”

— Google Search Central, URL structure best practices

On faceted navigation, Google says canonical and nofollow are less effective in the long run than robots.txt for reducing crawling, and recommends returning a 404 for filter combinations with no results, for duplicate or nonsensical filters and for nonexistent pagination.

A robots.txt example for common traps

User-agent: *
# Sort and view parameters
Disallow: /*?*sort=
Disallow: /*?*view=
# Session IDs
Disallow: /*?*sid=
Disallow: /*;jsessionid=
# Internal search
Disallow: /search
# Calendar beyond the event listing itself
Disallow: /events/*?month=

Test any pattern against real URLs before deploying, because a broad wildcard can block pages you want crawled. Our guide to robots.txt versus meta robots explains when each applies. And as Google's 2008 post put it: "don't forget to verify that Googlebot can find all your content some other way."

A step-by-step clean-up for an existing trap

  1. Quantify it. From logs or Crawl Stats examples, estimate how many Googlebot requests per day go to the trap pattern.
  2. Find the link source. Use a crawler's inlinks report or URL Inspection to find the template that generates the links.
  3. Decide what should be indexable. Some filter pages (for example, "red dresses") may deserve to rank. List those explicitly.
  4. Fix links at source for anything that is simply a bug: relative links, session IDs, tracking parameters, empty "next" links.
  5. Return correct status codes for empty, invalid and out-of-range URLs.
  6. Block the remaining pattern in robots.txt, leaving the indexable subset crawlable through clean URLs.
  7. Keep sitemaps clean so they list only canonical, indexable URLs.
  8. Monitor for four to eight weeks before judging the result.

Worked example (hypothetical): an events venue site has 900 real pages. Logs show Googlebot making about 6,000 requests a day, 4,700 of them to /whats-on/?date= URLs stretching years into the future, most returning an empty "No events" page with a 200 status. The fix: stop rendering the "next month" link beyond the last month with events, return 404 for empty future months, and disallow /whats-on/?date= in robots.txt while keeping the main listing and individual event pages crawlable. Eight weeks later, the team measures what share of Googlebot requests now go to event pages and how quickly newly announced events are first crawled. Those two numbers, not total crawl volume, show whether the trap is closed.

Stopping new traps before they ship

Most traps are created by ordinary development work: a new filter, a plugin, a redesigned pager. A short checklist in the release process prevents most of them.

  • Any new link-generating component (filters, calendars, pagers, "related" widgets) gets an SEO review before launch.
  • Internal links always use root-relative or absolute URLs.
  • Filter parameters are applied in a fixed order and duplicates are rejected.
  • Empty and invalid states return 404, not a 200 page saying "nothing found".
  • Tracking parameters are never added to internal links; use event tracking instead.
  • Staging environments are crawled with the same depth and parameter limits before release; see our guide to staging site SEO.
  • A weekly automated crawl of a sample section alerts if URL counts jump.

Locale and geo logic can also create loops; if your site redirects visitors by country, read our guide to IP-based redirects as well.

Measuring crawl improvement after the fix

Do not judge success by total crawl requests. A drop in requests might mean the trap is closed, or it might mean Google is crawling less of everything. Track these instead:

  • Share of Googlebot requests to indexable URLs (from logs). This should rise.
  • Requests to the trap pattern. These should fall, though not to zero immediately; Google may still revisit known URLs for a while.
  • Time to first crawl for new pages. This should shorten.
  • Page indexing report counts for duplicate and "crawled – not indexed" URLs. These should decline over weeks.
  • Server load from bots, which matters for hosting costs and site speed.

Keep the scale in proportion. Google's own crawl budget guide is aimed mainly at large sites (it gives rough figures of 1 million+ unique pages changing weekly, or 10,000+ pages changing daily). A 200-page brochure site with a calendar trap has a waste problem and an index quality problem more than a budget problem. Our guides to crawl budget, index bloat and large-site SEO explain where the line sits.

Google also notes that soft 404s "will continue to be crawled, and waste your budget", which is why returning proper error codes for empty pages matters as much as blocking.

Questions SEOs ask about spider traps

Is a spider trap a penalty risk?

No. It is a crawl efficiency and index quality problem, not a policy violation. The cost is slower discovery of real pages, duplicate URLs in the index and extra server load.

Should I use robots.txt or canonical tags for filter URLs?

Google's faceted navigation guidance says robots.txt is more effective in the long run for reducing crawling, while canonical and nofollow are weaker. Use canonical where you want variants crawled but consolidated.

Will blocking a trap in robots.txt remove the URLs from Google's index?

Not necessarily. Blocked URLs can remain indexed without content if they are linked. Fixing links at source and returning 404 for invalid URLs helps them drop out.

How do I find what is creating trap URLs?

Use a crawler's inlinks report or the referring page shown in URL Inspection to find the template or component generating the links, then fix it there.

Do small sites need to worry about spider traps?

Less about crawl budget, which Google frames as a large-site concern, but traps still create duplicate URLs and wasted crawling, so it is worth closing obvious ones like endless calendars.

Closing your site's crawl traps this quarter

Run a capped crawl and a log sample this week, group URLs by pattern, and list every pattern where crawl volume far outstrips indexable pages. Fix link bugs at source first, then return correct status codes, then block what remains. Measure the share of Googlebot hits going to real pages before and after.

If you want a crawl and log audit, our technical SEO team can find and close traps, and our ecommerce SEO service handles faceted navigation on large catalogues. Get a quote for a crawl efficiency audit.

Further reading on spider traps

Sources for this spider traps guide

  1. URL structure best practices for Google Search – Google Search Central
  2. Managing crawling of faceted navigation URLs – Google Search Central
  3. Crawl budget management for large sites – Google Search Central
  4. To infinity and beyond? No! – Google Webmaster Central Blog (August 2008)
  5. Crawl Stats report – Search Console Help
  6. Verifying Googlebot and other Google crawlers – Google Search Central
Rohit Choudhary
Written byRohit ChoudharyCo-Founder, My SEO Experts

Rohit Choudhary is the co-founder of My SEO Experts and has more than 14 years of hands-on experience in SEO, paid advertising and digital marketing. Since starting out in 2011 he has helped hundreds of businesses grow through practical, data-driven search strategies, and he also serves as a consulting Digital Marketing Director for several US-based companies.

Keep reading

Related articles

Ready to grow your business online?

Get a free, no-obligation proposal tailored to your goals and budget.

CallFree Quote