Cloudflare errors 520, 521, 522 and 524 explained

Updated 10 November 2026 · Site Down Right Now

Millions of websites sit behind Cloudflare, which receives visitors' requests and passes them on to the website's own server, called the origin. When Cloudflare can't get a proper answer from the origin, it shows a branded error page with a 52x code.

For visitors, all of these mean the same thing: the website's own server has a problem, and Cloudflare itself is working.

What each code means

  • 520 Web server returned an unknown error: the origin sent back an empty, invalid or unexpected response.
  • 521 Web server is down: the origin refused the connection. The web server is stopped, or it's blocking Cloudflare's IP addresses.
  • 522 Connection timed out: Cloudflare couldn't complete a connection to the origin in time. The server is overloaded, offline, or a firewall is dropping traffic.
  • 523 Origin is unreachable: Cloudflare couldn't find a route to the origin, often because of a wrong DNS record.
  • 524 A timeout occurred: the origin accepted the connection but didn't send a response within 100 seconds.
  • 525 SSL handshake failed and 526 Invalid SSL certificate: the HTTPS connection between Cloudflare and the origin failed.

What you can do as a visitor

Wait a few minutes and reload. These errors are on the website's side, so changing your browser or network rarely helps. You can confirm with our website checker. If it's a service you use often, look it up in our status list to see whether others are reporting problems.

If you own the website

  • For 521 and 522, check the web server is running and that your firewall allows Cloudflare's IP ranges on ports 80 and 443.
  • For 523, check your DNS records in Cloudflare point at the right origin IP.
  • For 524, move long-running work to background jobs.
  • For 525 and 526, install a valid certificate on the origin (a free Cloudflare Origin Certificate works) and check your SSL/TLS mode.

Why Cloudflare errors are almost never Cloudflare's fault

Cloudflare sits in front of millions of websites. When you see a Cloudflare error page, the diagram at the top shows three boxes: your browser, Cloudflare, and the website's server ("Host"). The box marked "Error" tells you where the chain broke. For 520, 521, 522 and 524 it's almost always the host, meaning the website's own server, so Cloudflare is working but can't get a proper answer from behind it.

Genuine Cloudflare outages do happen, but they look different: many unrelated websites fail at the same moment, often with 500-series pages that blame Cloudflare itself. When that happens, our incidents page usually shows dozens of services failing together.

Other Cloudflare codes you might see

  • 523 Origin is unreachable: Cloudflare can't find a route to the server, often a DNS or network problem at the host.
  • 525 SSL handshake failed and 526 Invalid SSL certificate: the secure connection between Cloudflare and the server failed, usually an expired or misconfigured certificate on the server.
  • 1020 Access denied: a firewall rule set by the website owner blocked your request.

Checklist for site owners

Confirm your server is running and listening on ports 80 and 443, make sure your firewall allows Cloudflare's published IP ranges, check that the SSL mode in Cloudflare matches what your server supports, and move long-running jobs out of the request so responses come back well within 100 seconds.

Questions

Is Cloudflare down when I see a 52x error?

Usually not. These errors mean Cloudflare is working but can't reach the website's own server. A real Cloudflare outage affects many unrelated sites at once.

How long do Cloudflare 522 errors last?

Until the website's server comes back or its firewall is fixed. Short ones last minutes; a server that's fully down can take hours.

How do I know if Cloudflare itself is down?

If many unrelated websites show Cloudflare error pages at the same time, Cloudflare may have an outage. Check cloudflarestatus.com and our incidents page.

What does Cloudflare error 1020 mean?

The website owner has a firewall rule that blocked your request. Turning off a VPN or contacting the website may help; Cloudflare can't lift it for you.