Cloudflare 5xx and 1xxx errors: you or the site?
What 520 to 530 and 1003 to 1020 mean, in plain language: which ones you can do something about, which only the site can fix, and what to send its support.
3 min read
On this page
A page with the Cloudflare logo and a number doesn't mean that Cloudflare is broken. Many sites are behind it, and it's reporting a problem either with the site's server or with a rule the site has set. Which one depends on the number:
- 1You → CloudflareWorked, or you wouldn’t see its page
- 2Cloudflare’s rules1xxx codes and blocks come from here
- 3Cloudflare → the site’s server520 to 526 come from here
Seeing a Cloudflare error means your own connection reached Cloudflare.
520 to 530: the site's server
Two exceptions are worth trying:
- 520 can be caused by oversized headers. Cloudflare lists headers over 128 KB among the causes, "often due to excessive cookies". If the site works in a private window, delete its cookies.
- 524 means that the server was working on your request and took too long: 125 seconds by default. Export a shorter period, upload a smaller file, or ask for less at a time. It may have finished the work even though you saw an error, so look before repeating an order or a payment.
Reloading every few seconds doesn't help, and can make things worse for an overloaded server. Check the site's status page if it's a large service.
500, 502, 503 and 504 can come from the site or from Cloudflare. If the page has the site's own design, or mentions nginx or another program, it's from the site.
1xxx: rules, and you
You can produce one yourself. Opening a Cloudflare address without a site name gives 1003:
curl -s http://104.18.32.47/error code: 1003(On Windows, use curl.exe.)
1015 is the one that punishes impatience. Cloudflare's documentation warns that repeated attempts may extend the block. Close the tab, including any that refresh by themselves, and come back later. If you've hardly used the site, you may be sharing an address with others who have: that happens with carrier-grade NAT, company networks and VPNs.
1009 goes by the country your address is assigned to. If it's wrong for where you are, see why IP geolocation is often wrong.
1006, 1007, 1008 and 1106 are bans on your address. Look it up on the home page to see whether it has an abuse record or counts as a proxy. If it's a VPN's address, the ban is probably about someone else.
1020 is often described as "the firewall blocked you". That's only partly true now. According to the current documentation, it appears when a security rule blocks a request and no custom response is set, for example with API Shield validation. Requests blocked by the site's WAF rules get a different block page without this number.
"Sorry, you have been blocked" and "Verify you are human"
These pages have no code. The first is the block page mentioned above. Cloudflare's security rules matched something in your request: the address, the browser, or text you submitted. Posting a piece of code in a comment is enough on some sites.
The second is a check that you can pass. If it returns again and again, see why it loops.
To see how Cloudflare sees your connection, and whether a real Turnstile test passes in your browser:
What to send
At the bottom of the page is a Ray ID, which identifies that one request. With it, the site's operators can find the exact reason in their logs. Write to the site, not to Cloudflare, which doesn't change its customers' rules for visitors. Include:
- the code and the Ray ID, or a screenshot
- the time, with time zone
- what you were doing
- your public IP address, if the code concerns your address
The page shows your address next to the Ray ID. Keep that in mind before posting the screenshot in public.
If the site is yours
The short version, by code: 521 check that the server is running and lets Cloudflare's addresses through; 522 the same, plus overload and the route; 523 the DNS record's address; 524 move long work into the background; 525 and 526 the certificate on your server, with the encryption mode set in Cloudflare; 520 the server's error log, for crashes and header size.