Table of contents
- Quick summary
- Why a 429 can still hurt you
- What the scan data shows
- Path A: nginx, with discovery files exempt
- Path B: Cloudflare rate limiting rules
- Path C: limiting in the application
- Apache
- Vercel
- Netlify
- WordPress
- Check it with AIScan first
- If you would rather check by hand
- How fast AI crawlers arrive on our server
- Choose the numbers from your logs
- Next action
Most advice on rate limiting AI crawlers stops at "add a limit". The part that costs you is where the limit applies and what it answers. A limit that covers /robots.txt and /llms.txt makes your own front door look broken to the agents you want. A limit that answers with the wrong status code can make a crawler read your whole site as closed.
This guide shows how to cap crawler load on nginx and Cloudflare while keeping the discovery files open, and how to prove the result with a curl loop. I measured the behaviour on a small local server on 15 October 2026. The nginx and Cloudflare settings come from their documentation, and I say below which ones I did not run.
Updated on 23 November 2026: new sections for Apache, Vercel, Netlify and WordPress, what the scan data shows about 429s on discovery files, and how fast AI crawlers arrived on our own server, so you can size a burst from data rather than a guess.
Quick summary
| Question | Short answer |
|---|---|
| Is returning 429 to a crawler wrong? | No. RFC 6585 defines 429 for "too many requests in a given amount of time" and says a Retry-After header MAY tell the client how long to wait. |
| What goes wrong in practice? | The limit also covers the files agents read first, and the 429 carries no Retry-After. |
| What does nginx do by default? | limit_req rejects with 503, not 429, unless you set limit_req_status. |
| Why does that matter for robots.txt? | RFC 9309 tells crawlers to assume complete disallow when robots.txt is unreachable with a 5xx. A 4xx means "unavailable" and the crawler MAY crawl anything. |
| Which AIScan checks does this touch? | D1 (robots.txt), C1 (Markdown negotiation on the homepage), C2 (llms.txt) |
| Which section is mine? | nginx: Path A. Cloudflare: Path B. Apache: no request limiter in core, see Apache. Vercel: a WAF rule with a path condition. Netlify: rate_limit on a redirect or a function. WordPress: at the host or CDN, not in a plugin. |
| How fast do crawlers arrive? | On our server, hits claiming to be ClaudeBot came a median 1.0 s apart; GPTBot 9.5 s, CCBot 14.3 s. A burst of 10 covers all of them. |
| Time | About 15 minutes |
Why a 429 can still hurt you
A 429 is an honest answer. The trouble starts when it lands on the wrong request.
Google's documentation says its crawlers treat 429 as a server-overloaded signal, the same as a 5xx, and slow down. Other 4xx codes are treated as "the content doesn't exist". So for Google, 429 is the one 4xx that is meant to mean "come back slower". I only read Google's page. I did not find equivalent text from the AI crawler operators, so treat Retry-After handling by those bots as unknown. For the robots.txt Crawl-delay line, which Anthropic and Common Crawl document and Google, Amazon and Apple ignore, see Does Crawl-delay slow AI crawlers?
Scanners and agents that make a handful of requests are a different case. They do not back off. They record whatever came back. In our own data, a rate limit that answered before the file did showed up in 61 of the 208 blocked-probe failures we counted across 712 sites, and 12 of 18 D1 flips in our determinism audit traced to a 429 on one scan and not the next. The details are in the blocked-probe study and the determinism self-audit.
Three configurations cause most of it:
- One bucket for every path. The same counter covers
/robots.txt,/llms.txt,/sitemap.xmland your heaviest pages. A crawler that fetches robots.txt and then ten pages can be refused the robots.txt on its next visit. - A 5xx as the limit response. nginx does this by default. A 503 on robots.txt is the "unreachable" case in RFC 9309, which tells a compliant crawler to assume complete disallow.
- No
Retry-After. The header (RFC 9110 §10.2.3) is optional, but without it the client has to guess how long to wait.
What the scan data shows
Across 863 sites in our scan database (latest scan per host, rubric 2026.08.2, queried 19 November 2026), a 429 answered our request for /robots.txt on 24 sites and for /llms.txt on 27. On 17 November, 98 of the 132 partial results on E1, the check that asks for a made-up path and wants a 404, were a 429 to that probe. The site was not missing anything. Its limit answered first.
I tried to re-run both queries on 23 November and the database did not answer, so these are the 19 November figures. The pattern is the same one the blocked-probe study found: the limit is set for pages and applied to everything.
Path A: nginx, with discovery files exempt
nginx's limit_req module documents that a request whose key is empty is not accounted. That gives you a clean way to exempt paths: build the key with a map, and return an empty string for the files you never want to limit.
# http context
map $uri $limit_key {
default $binary_remote_addr;
/robots.txt "";
/llms.txt "";
/sitemap.xml "";
}
limit_req_zone $limit_key zone=perip:10m rate=2r/s;
limit_req_status 429;
server {
# ...
error_page 429 = @slow_down;
location / {
limit_req zone=perip burst=10 nodelay;
# your normal config
}
location @slow_down {
add_header Retry-After 5 always;
return 429 "Too many requests. Retry after 5 seconds.\n";
}
}
What each part does:
mapsets the key. Exempt paths get"", so nginx does not count them against anyone.rate=2r/swithburst=10 nodelaylets a crawler fetch ten pages at once, then holds it to two a second. The documentation describesburstas the queue size andnodelayas serving burst requests without spacing them out. Pick numbers from your own access log, not from this example.limit_req_status 429replaces the 503 default.- The named location adds
Retry-Afteronly on the rejection, so your normal 200 responses stay clean.
I did not run this nginx block. There is no nginx in the sandbox I work in. The directives and their defaults come from the nginx documentation I read on 15 October 2026. Run nginx -t before you reload, then use the probe loop in the verification section to confirm the headers.
Path B: Cloudflare rate limiting rules
In Cloudflare, rate limiting lives under Security, in rate limiting rules. The relevant facts from the documentation, read on 15 October 2026:
- The Block action returns 429 by default. You can change the code, but only to a value between 400 and 499, so you cannot make Cloudflare answer a limit with a 503.
- A rule's expression decides which requests it counts. That is where you exempt the discovery files.
- The page warns that applying rate limiting to verified bots might affect SEO and points to its Improve SEO guide, which lists "rate limiting rules are allowing Verified Bots" as one of the checks.
A rule that leaves the discovery files alone looks like this in the expression editor:
not (http.request.uri.path in {"/robots.txt" "/llms.txt" "/sitemap.xml"})
Set the characteristic to IP, choose a request count and period that match your log, and keep Block as the action. The parameters page I read lists the response type, the response code and the response body for Block. It does not list a setting for a Retry-After header. If you need that header on Cloudflare, check the current dashboard or a Transform Rule before you rely on it, because I did not confirm it.
I did not create a rule on a live zone, so the expression above is the documented syntax and not a tested one. Cloudflare also says counters are per data centre and that a few seconds of delay can let extra requests reach your origin, so treat the number as a ceiling, not an exact gate.
Path C: limiting in the application
If you have no proxy in front, the same shape works in code: one counter, a short list of exempt paths, a 429 with Retry-After. This is the stdlib server I used to measure the effect. It runs in two modes, naive (one bucket for everything, no header) and tuned (discovery files exempt, header on every 429).
import sys, time
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
MODE = sys.argv[1] # "naive" or "tuned"
RATE, BURST = 2.0, 5 # tokens per second, bucket size
EXEMPT = {"/robots.txt", "/llms.txt", "/sitemap.xml"}
bucket = {"tokens": BURST, "t": time.monotonic()}
def allow():
now = time.monotonic()
bucket["tokens"] = min(BURST, bucket["tokens"] + (now - bucket["t"]) * RATE)
bucket["t"] = now
if bucket["tokens"] >= 1:
bucket["tokens"] -= 1
return True
return False
class H(BaseHTTPRequestHandler):
def do_GET(self):
if MODE == "tuned" and self.path in EXEMPT:
return self.reply(200, b"ok\n")
if allow():
return self.reply(200, b"ok\n")
extra = {"Retry-After": "2"} if MODE == "tuned" else {}
self.reply(429, b"Too Many Requests\n", extra)
def reply(self, code, body, extra=None):
self.send_response(code)
self.send_header("Content-Length", str(len(body)))
for k, v in (extra or {}).items():
self.send_header(k, v)
self.end_headers()
self.wfile.write(body)
ThreadingHTTPServer(("127.0.0.1", int(sys.argv[2])), H).serve_forever()
The bucket here is global, which keeps the example short. In production, key it by client address, as the nginx example does.
Apache
Apache httpd has no per-client request limiter in its core modules, and the module with the promising name does something else. The mod_ratelimit documentation says it limits client bandwidth: the throttle "is applied to each HTTP response while it is transferred to the client, and not aggregated at IP/client level". It slows a download. It does not count requests.
- List the loaded modules with
apachectl -Mand look forratelimit_module,evasive20_module,qos_moduleorsecurity2_module. - If you only have
mod_ratelimit, you have no request limit. Settingrate-limitmakes every response slower, robots.txt included, and each throttled response holds a server thread for its whole transfer, which the documentation warns about. - If you have mod_evasive, know what it answers. Its README says a client that trips
DOSPageCountorDOSSiteCountgets a 403, and then every request from that IP gets 403 forDOSBlockingPeriodseconds, with the timer reset on each new request. That includes/robots.txt. Under RFC 9309 a 4xx on robots.txt means "unavailable", and the crawler MAY crawl anything, so you lose your rules for exactly the client you were trying to slow.DOSWhitelisttakes IP addresses, not paths, so you cannot exempt the discovery files. - Put the limit where it can exempt paths: nginx in front of Apache (Path A), or a CDN rule (Path B, Vercel, Netlify). ModSecurity can count requests too, but I did not verify a rule for it, so I am not printing one.
- Run the probe loop below and confirm the files return 200 while pages return 429.
Vercel
Vercel's WAF Rate Limiting page (last updated 28 August 2026, read on 23 November) says it is available on all plans, that the default action is Too Many Requests (429), and that counters are kept per region, so traffic from several regions can pass the number you set.
- Open your project in the dashboard and select Firewall in the sidebar.
- Select Configure, then + New Rule, and give it a name such as "Page rate limit, discovery files exempt".
- Under If, add Request Path with the operator Does not match expression and the value
^/(robots\.txt|llms\.txt|sitemap\.xml)$. The rule configuration page lists that operator as the inverse of a PCRE match. To aim the rule at one crawler, add a second condition, User Agent with Contains, joined with AND. - Under Then, select Rate Limit, keep Fixed Window (Token Bucket is Enterprise only), and set Time Window (default 60s) and Request Limit (default 100) from your log.
- Keep the key on IP. The User Agent counting key is Enterprise, or Pro for Priority projects. A condition on the user agent decides which requests the rule sees; the key decides who shares a counter.
- Leave the action on Too Many Requests (429). Deny (403) and Challenge are the wrong answers for a crawler. If you are unsure of the numbers, pick Log first and watch the Firewall overview for a day.
- Select Save Rule, then Review Changes, then Publish.
On Hobby you get one rate limit rule per project, inside a total of three custom rules. The page does not mention a Retry-After header on the 429, and I did not create a rule on a live project, so I cannot tell you whether one is sent. Check with curl -D - after you publish.
Netlify
Netlify rate limiting blocks with 429 by default or rewrites to a page you name. Code-based rules work on every plan and target by path only. Rules in the UI, which can match a header such as user-agent, are Enterprise with High-Performance Edge. Netlify also says enforcement can take up to 10 seconds after a client crosses the threshold, so a short burst gets through.
- Decide what you are protecting. On a static site the crawler costs bandwidth. If the cost is in a function, limit the function in its own
configexport withrateLimit: { windowLimit, windowSize, aggregateBy: ["ip", "domain"] }, which leaves every static file alone. - For a site-wide limit, add a
[[redirects]]rule innetlify.tomlwith a[redirects.rate_limit]table, as Netlify's "Protect your whole site" example does. Limits cannot go in a_redirectsfile. - Exempt the discovery files above that rule. Netlify's redirects page says the engine uses "the first matching rule it finds, reading from top to bottom", so a rule for the files placed first, with no
rate_limit, is never counted. - Deploy, then open the deploy log. Rules are validated in the post-processing stage, and an invalid rule does not fail the deploy, it just does nothing.
- Run the probe loop, and wait more than 10 seconds before you read the result.
# netlify.toml: discovery files first, not limited
[[redirects]]
from = "/robots.txt"
to = "/robots.txt"
status = 200
[[redirects]]
from = "/llms.txt"
to = "/llms.txt"
status = 200
[[redirects]]
from = "/sitemap.xml"
to = "/sitemap.xml"
status = 200
# everything else: 50 requests per IP per minute
[[redirects]]
from = "/*"
to = "/:splat"
[redirects.rate_limit]
window_limit = 50
window_size = 60
aggregate_by = ["ip", "domain"]
The last block follows Netlify's example. The three pass-through rules are my own construction for the first-match rule and are not on Netlify's page. I did not deploy this file, so check the deploy log and the probe before you trust it.
WordPress
WordPress core has no request rate limit, and a plugin is the wrong layer for one: by the time PHP runs, the request already cost you most of what a limit saves, and a static robots.txt may never reach WordPress at all. The limit belongs at the host or the CDN.
- Find out what is in front of the site. Run
curl -sI https://yoursite.com/and read the headers: acf-rayheader means Cloudflare (use Path B), anx-vercel-idmeans Vercel. - Ask your host whether their firewall rate-limits, what status it answers with, and whether
/robots.txt,/llms.txtand/sitemap.xmlare exempt. A host limit that answers 503 is the worst case in RFC 9309. - Check what your security plugin does to bots. Some block or challenge crawlers by user agent, which is a different problem from a rate limit; the security plugin guide covers which settings do it. BetterShield limits only public form posts (comments, password resets and sign-ups, under BetterShield › Protection › Login & Access in Request protection), so page and robots.txt fetches are never counted.
- Keep the files themselves in one place. ThinkRank edits robots.txt and llms.txt from one plugin, so the exempt list you write at the CDN has one file to point at, not three plugins competing for it.
- Run the probe loop and the scan.
Check it with AIScan first
Run the scan: npx aiscan-cli yoursite.com, or paste the address at aiscan.site. It is free and needs no account. Read three results:
- D1 fetches
/robots.txtand wants a 200. If the evidence readsHTTP 429orHTTP 503, a limit is answering before the file. - C2 does the same for
/llms.txt. - C1 re-requests your homepage with
Accept: text/markdown. A limit that fires on the second request in a burst can fail this check even though the first one would have passed.
AIScan sees one visitor making a few requests. It cannot see how your limit treats a crawler making hundreds, so a clean scan does not prove your thresholds are right. Scan more than once, because a single 429 can flip a result.
If you would rather check by hand
This loop sends twenty quick requests to a normal page, then asks for each discovery file and prints the status and any Retry-After. Point it at your own host, and only your own host.
base=https://yoursite.com
for i in $(seq 1 20); do curl -s -o /dev/null -w '%{http_code}\n' "$base/"; done | sort | uniq -c
for p in robots.txt llms.txt sitemap.xml; do
printf '%s ' "$p"
curl -s -D - -o /dev/null "$base/$p" | awk 'NR==1{printf "%s ",$2} tolower($1)=="retry-after:"{printf "retry-after=%s",$2} END{print ""}'
done
Here is what the two server modes returned for that shape of test on my machine, with the bucket set to five tokens and two a second:
| Mode | Page requests (20) | robots.txt | llms.txt | sitemap.xml |
|---|---|---|---|---|
| naive | 5 × 200, 15 × 429 | 429 | 429 | 429 |
| tuned | 5 × 200, 15 × 429 | 200 | 200 | 200 |
The page numbers match on purpose. The limit still does its job. The only change is that the files agents read first stay answerable. In tuned mode a 429 on a page also carried Retry-After: 2, which I confirmed with curl -D -.
What a good result looks like on your site: some 429s on the page loop, 200 on all three files, and a Retry-After on the 429s. If the files return 429 or 5xx, the exemption is not matching. Common causes are a rewrite that changes the URI before the map sees it, or a CDN rule that runs in front of nginx and has its own counter.
On 23 November 2026 I ran that loop against our own five sites (aiscan.site, xspeedcache.com, storeseo.com, bettershield.ai, thinkrank.ai). All 100 page requests returned 200, and robots.txt and llms.txt returned 200 on every site. None of our sites limits a client sending twenty requests one after another.
How fast AI crawlers arrive on our server
Our own crawler log (ai_crawler_hits on aiscan.site, 25 August to 19 November 2026) records hits on API, MCP and probe paths. For each claimed user agent I measured the gap between consecutive hits from the same hashed IP.
| Claimed user agent | Median gap between hits | Note |
|---|---|---|
| ClaudeBot | 1.0 s | 204 of 410 gaps under one second |
| PerplexityBot | 3.9 s | |
| OAI-SearchBot | 7.0 s | |
| GPTBot | 9.5 s | |
| Amazonbot | 10.5 s | |
| Bytespider | 10.9 s | |
| CCBot | 14.3 s |
These are claimed user agents. Many of the hits on probe paths are impostors wearing a crawler's name, as our fake crawler study found, so use the table to size a limit, not to judge a vendor. What it says for the numbers: the fastest client here sends about one request a second, with half its gaps shorter. A limit of 1 r/s with no burst would refuse roughly half of those. The Path A setting, 2 r/s with a burst of 10, refuses none of them. To build the same table from your own access log, start with finding AI crawlers in server logs.
Choose the numbers from your logs
A limit that is too tight hurts more than one that is too loose. Before you set rate, count what real crawlers do. Group your access log by user agent and by minute, and look at the busiest minute of the busiest legitimate crawler. Set the limit above that, with a burst that covers a crawler fetching a page and its assets in one go. If you are not sure who is who, the AI crawler user-agent list separates the real names from the fake ones, and the traffic-waste study shows why conditional requests cut load more than a hard cap does.
If a bot you do not want keeps arriving, a limit is the wrong tool. Say so in robots.txt and enforce it at the firewall. A challenge page is the wrong tool as well: an AWS WAF Challenge answers a crawler with HTTP 202, and the crawler reads that as the page.
Next action
Run npx aiscan-cli yoursite.com and read D1, C1 and C2 first. If any shows HTTP 429 or a 5xx, fix the exemption before you tune the rate. The rest of the discoverability fixes are on the discoverability checks page, the Markdown side is on the content checks page, and every how-to is listed under /guides.
Frequently asked questions
Is returning HTTP 429 to an AI crawler wrong?
No. RFC 6585 defines 429 for too many requests in a given time and allows a Retry-After header. Google documents that its crawlers treat 429 as a signal to slow down. The problems come from where the limit applies and whether the response says when to retry.
Why does my robots.txt return 503 under load?
If you use nginx limit_req, rejected requests get 503 by default, and that includes robots.txt unless you exempt it. RFC 9309 says a crawler must assume complete disallow when robots.txt is unreachable with a 5xx. Exempt the file and set limit_req_status 429.
My AIScan report shows HTTP 429 on D1. What do I do?
A rate limit answered before robots.txt did. Exempt /robots.txt from the limit, or raise the limit for the scanner's requests, then scan again. Check your proxy or CDN counters too, because a second limit in front of the origin can cause the same result.
My C2 check fails with HTTP 429 on /llms.txt. Is the file missing?
No, the file may be fine. The limit rejected the request before the file was served. Add /llms.txt to the exempt list next to robots.txt and sitemap.xml, then re-run the scan and read the evidence string.
nginx returns 429 but there is no Retry-After header. Why?
limit_req does not add one. Send it from a named location reached through error_page 429, with add_header Retry-After 5 always, so it appears on the rejection and not on normal 200 responses.
Can Cloudflare rate limiting return a 503 instead of a 429?
Not through the Block action. Cloudflare's documentation says a custom response code must be between 400 and 499, and the default is 429.
Should I rate-limit verified bots on Cloudflare?
Cloudflare's rate limiting page warns it might affect SEO, and its Improve SEO guide lists rate limiting rules allowing verified bots as a check. Start by exempting verified bots, then tighten only if your logs show a real load problem.
Does a clean scan prove my limits are safe for crawlers?
No. A scan makes a few requests from one client, so it cannot show how your limit treats a crawler making hundreds. Use the curl loop for a burst test, and set the numbers from your access log.
Does Apache's mod_ratelimit limit requests per IP?
No. Its documentation says it limits client bandwidth per response, in KiB/s, and is not aggregated at IP or client level. It slows every download, robots.txt included, and counts nothing. Put a request limit in nginx or a CDN in front instead.
My Apache site answers 403 to crawlers after a burst. Why?
Probably mod_evasive. Its README says a client over DOSPageCount or DOSSiteCount gets 403, and then every request from that IP gets 403 for DOSBlockingPeriod, robots.txt included. Its whitelist takes IP addresses, not paths, so move the limit to a layer that can exempt files.
My Vercel rate limit rule returns 403, not 429. What is wrong?
The rule's action is set to Deny (403). Edit the rule, set the action back to the default Too Many Requests (429), then Review Changes and Publish. Challenge is also a poor choice for crawlers, because they cannot solve it.
My Netlify rate limit does nothing. Is the rule broken?
Open the deploy log and look at the post-processing stage, where Netlify validates rate limit rules. An invalid rule does not fail the deploy. Also wait more than 10 seconds when testing, since Netlify says enforcement can lag that long, and remember limits cannot go in a _redirects file.
Should a WordPress security plugin rate-limit AI crawlers?
No, put the page limit at the host or CDN, where it can exempt robots.txt and llms.txt before PHP runs. Plugins that limit form posts, such as BetterShield's request protection for comments, password resets and sign-ups, do not count page or robots.txt fetches.

About the author
M Asif Rahman
Entrepreneur, curious about AI
I have been building companies for a long time, and lately most of my curiosity goes to AI. AIScan is a small personal project I built on a flight from Dubai to Narita. I use it to understand how ready the web is for AI agents, and I share what the scans teach me.
Related guides
AI readiness setup guide by platform (2026)
Verified 17, 18, 20 and 22 October 2026. Updated on 22 October 2026. An AIready site needs six things: a robots.txt that names AI crawlers D1, B2, a sitemap D2, a declared feed E5, an llms.txt C2,…
Link Headers for AI Agent Discovery: Next.js, Astro, Vercel, Netlify, Cloudflare, WordPress
Updated on 26 November 2026: a new section for Shopify, Webflow, Framer and Wix, where the builder's CDN sends the header and you add head tags instead, measured on 889 sites. Updated on 15 November…
llms.txt vs robots.txt vs sitemap.xml: Six Files, 843 Sites
Updated on 15 November 2026. The study below was measured on 4 September 2026; a rerun on 843 sites, scanned up to 15 November, is in its own section, and the live examples were rechecked the same…
