Diagnosing Cloudflare Rate Limiting 429s: A Practical Troubleshooting Guide
Legitimate traffic is served 429s by Cloudflare. This guide diagnoses common misconfigurations—wrong URI patterns, low thresholds, API failures, cache bypass—providing a step‑by‑step flow, API examples, and escalation steps.
01 Sept 2026, 09:03 UTC

Problem Statement
When legitimate traffic is unexpectedly served an HTTP 429 Too Many Requests response, the first instinct is to blame an overly aggressive rate‑limit. Cloudflare’s Rate Limiting feature can misfire for a variety of reasons—mis‑scoped rules, low thresholds, cache interference, or API misconfigurations. This guide walks through the most common causes, ordered checks, corrective actions, and when to involve Cloudflare support.
Recognizable Condition
Clients receive 429 responses even though the site’s traffic volume is well below the configured limit. The response header cf-ray is present, confirming the request hit Cloudflare, but no obvious attack patterns are visible in the logs.
Cause‑Diagnostic Table
| Cause | Diagnostic Clue |
|---|---|
| Wrong URI pattern or missing host header | Rule ID appears in cf-firewall-events but the request path does not match intended target. |
| Threshold too low / burst allowance insufficient | Rate limit counter resets too quickly; many requests within a short window hit the limit. |
| Silent API failure | Rule creation/update appears successful in the dashboard, but the rule is absent when queried via API. |
| Cache bypassing evaluation | Cache Level set to Cache Everything and the request matches a cached object, skipping rate‑limit logic. |
Ordered Checks
- Confirm the rule ID in the logs.
Verify thecurl -X GET "https://api.cloudflare.com/client/v4/zones/ZONE_ID/firewall/events?status=blocked" \ -H "Authorization: Bearer YOUR_TOKEN" | jq '.result[] | select(.data.firewall_rule.id=="RULE_ID")'actionisblockand therule_idmatches the one you intended to apply. - Inspect the rule’s scope.
Look atcurl -X GET "https://api.cloudflare.com/client/v4/zones/ZONE_ID/rate_limits/RULE_ID" \ -H "Authorization: Bearer YOUR_TOKEN" | jq '.result'matchanduri_pattern. If the pattern is.*or missing a host header, the rule may apply to all requests. - Check burst and period settings.
In the API response, examinethreshold,period, andburst. Aperiodof 60s with aburstof 5 will block after five requests in a minute. - Validate cache configuration.
If the value iscurl -X GET "https://api.cloudflare.com/client/v4/zones/ZONE_ID/settings/cache_level" \ -H "Authorization: Bearer YOUR_TOKEN" | jq '.result.value'cache_everything, any cached response bypasses rate‑limit evaluation. - Reproduce with a unique query string.
Observe thecurl -I "https://example.com/page?nocache=123" -H "Host: example.com"cf-rayheader and anycf-ratelimit-*headers. A missingcf-ratelimit-*indicates the request did not hit the rate‑limit engine.
Fixes Tied to Findings
- Wrong URI pattern. Edit the rule to target the correct path or add a
hostconstraint. Example:
PATCH /zones/ZONE_ID/rate_limits/RULE_ID {\n \"match\": {\n \"uri_pattern\": \"^/api/v1/.*$\",\n \"host\": \"example.com\"\n }\n} - Threshold too low. Increase
thresholdorburstvalues. For a site with 200 requests/min, a threshold of 100 and burst of 20 is safer. - Silent API failure. Verify the API token has
Zone:ReadandZone:Writepermissions. Re‑run the POST/PUT and check the HTTP status code; 4xx indicates authentication or validation errors. - Cache bypass. Change Cache Level to
Standardfor the affected URI pattern, or add aCache-Control: no-cacheheader to bypass the cache.
Escalation Criteria
If after applying the above fixes the problem persists:
- Rate‑limit events continue to appear in the firewall log for the same rule ID.
- API calls to retrieve or modify the rule return
404or403despite correct credentials. - Cache configuration is confirmed to be
Cache Everythingand cannot be altered due to a higher‑level policy.
At this point, open a support ticket with Cloudflare, providing:
- Zone ID and rule ID.
- Sample
cf-rayvalues and timestamps. - API call logs and responses.
- Any relevant firewall event excerpts.
Limitations & Verification
Rate Limiting logic is evaluated per edge location; a global 429 may still occur if traffic spikes at a specific region. Use the cf-ray header to identify the edge. Also, overlapping rules can create unpredictable blocking—ensure rules are mutually exclusive or properly ordered. After each change, monitor the Firewall Events dashboard for at least 24 hours to confirm the issue is resolved.
Practical Check
Run a quick test:
curl -I "https://example.com/api/v1/resource?test=1" -H "Host: example.com"
# Inspect response code and headers
# Expect 200 OK and no cf-ratelimit-* headers if rule is bypassed
If you still receive a 429, revisit the diagnostic steps.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.