Errors and troubleshooting
What is Cloudflare error 1015?
Error 1015 "You are being rate limited" means the site's Cloudflare configuration counted too many requests from you in a time window and is now refusing them for a while.
The answer
Cloudflare lets site owners write rate limiting rules: "if one client sends more than N requests to these paths within this many seconds, block, challenge or log it for a set time". When your traffic matches a rule whose action is block, Cloudflare answers with an error page titled "Error 1015: You are being rate limited", usually with HTTP status 429. The limit is set by the site, not by Cloudflare globally, so the numbers differ from site to site and even from path to path. The fix is to send fewer requests per client identity, and to wait out the current block.
How the counting works
A rule counts requests that share a key. The default key is the client IP, but site owners on higher plans can count by other characteristics, such as a header, a cookie, a query parameter or a combination. That matters for scrapers:
- Counted by IP: spreading requests across more addresses lowers each count.
- Counted by a session cookie or API token: rotating IPs does not help, because the count follows the cookie.
- Counted per path: a strict rule may cover only search or login, while product pages are generous.
When the threshold is crossed, the action lasts for a mitigation period the owner chose, from seconds to hours. Requests during that period keep getting 1015, and in some configurations they extend it.
Recognizing it in code
The response is HTML with the 1015 code in the page and often a Retry-After header. Detect it explicitly so you can pause rather than hammer:
import time, random, requests
def polite_get(sess, url, max_tries=4):
for attempt in range(max_tries):
resp = sess.get(url, timeout=30)
limited = resp.status_code == 429 or ("1015" in resp.text and "rate limited" in resp.text.lower())
if not limited:
return resp
wait_s = int(resp.headers.get("Retry-After", 0)) or 30 * (attempt + 1)
time.sleep(wait_s + random.uniform(0, 5))
raise RuntimeError(f"still rate limited: {url}")
The marker text in the page can vary with language and template; checking the status code first and the body second is more robust.
How to stay under the limit
- Measure the threshold gently. Increase your rate slowly on one identity and note where 1015 begins, then run well below it.
- Use a shared limiter. If several workers hit the same site, enforce the per-identity rate centrally, as described under rate limiting.
- Spread load sensibly. When the key is the IP, more addresses at lower rates each will keep you clear; see IP rotation.
- Cache and skip. Do not fetch the same page twice in a run, and skip pages that have not changed.
- Back off on the first 1015. Continuing at full speed often extends the block.
1015 versus other Cloudflare responses
1015 is about volume. Error 1020 means a firewall rule denied the request based on its characteristics, regardless of rate. A managed challenge page ("Just a moment...") means Cloudflare wants proof that you are a browser, which you can answer with a clearance cookie. A 1015 cannot be solved with a CAPTCHA: no token or cookie lifts a rate limit block, because the rule is counting, not doubting. Only waiting and slowing down help. If you see challenges and 1015s together, address the rate first, then handle the challenges; the guide on telling Cloudflare protections apart shows how to classify each page.
When the rule follows a cookie
If 1015 continues after changing IPs, the site likely counts by a cookie or token. Starting a fresh session resets that count, but doing so to evade a limit is exactly the kind of behavior the site is trying to stop, and it can escalate to stricter blocks. Respect the limit: lower the rate per session and accept a longer crawl. For monitoring work, fetching fewer pages more often is usually better than many pages in bursts.
A note on fairness
Rate limits exist to keep sites usable for everyone. A scraper that stays within them is far less likely to meet stronger defenses later. For the broader picture, read why websites block automated requests and the HTTP view of the same problem in HTTP 429.
Common questions
How long does a Cloudflare 1015 block last?
As long as the site's rule says, from seconds to hours. Repeated requests during the block can extend it.
Can I solve a CAPTCHA to remove error 1015?
No. It is a rate limit, not a challenge. Only waiting and reducing your rate help.
Does changing my IP fix 1015?
Only if the rule counts by IP. Rules can also count by cookie, header or token.
What HTTP status comes with error 1015?
Usually 429 Too Many Requests, sometimes with a Retry-After header.
Is 1015 set by Cloudflare or by the site?
By the site owner, through rate limiting rules in their Cloudflare configuration.
Keep reading
- How do I avoid HTTP 429 Too Many Requests?A 429 means you crossed a rate limit; slow down, honor Retry-After, back off with jitter and spread load across sessions.
- Rate limitingCaps on requests per IP, key or session, the 429 response that enforces them, and the limit GateSolver applies to its own API.
- Tell Turnstile, managed challenges and blocks apartStatus codes, headers, page markers and cookies that separate a Turnstile widget, a challenge page and a hard Cloudflare block.
- Cloudflare error 1020 Access DeniedError 1020 means a site owner's firewall rule matched your request. What it covers, what a client can change, and what it cannot.