Back to blog

Cloudflare 52x Errors Explained for Website Owners

520–527 errors usually mean something broke between Cloudflare and your origin. Here is what each code signals.

Share

If your site sits behind Cloudflare, visitors may see 52x errors when something breaks between Cloudflare's edge and your origin server. These are not "your server is off" messages — they are connection-layer failures in the middle.

Common Cloudflare 52x codes

  • 520 — Unknown error; origin returned something Cloudflare could not interpret
  • 521 — Origin web server is down or refusing connections
  • 522 — Connection timed out; origin too slow or firewall blocking Cloudflare IPs
  • 523 — Origin unreachable (routing/DNS issue)
  • 524 — Timeout waiting for a response (long-running request or overloaded origin)
  • 525 — SSL handshake failed between Cloudflare and origin
  • 526 — Invalid SSL certificate on origin (common after cert renewals)
  • 527 — Railgun error (legacy; rare today)

Troubleshooting order

  1. Can you reach the origin directly (bypassing Cloudflare)?
  2. Is the origin certificate valid and matches the hostname Cloudflare uses?
  3. Are Cloudflare IP ranges allowed through your firewall?
  4. Is the origin overloaded or out of disk/memory?

Monitor from outside Cloudflare too

Edge checks confirm what users see. Origin checks (or monitors that detect 52x response bodies) tell you whether the problem is CDN-specific or deeper.

UpMonix failure detection recognises many Cloudflare error pages so incidents are labelled clearly in your dashboard and alerts.

Run a quick uptime check after any DNS or SSL change involving Cloudflare.

UpMonix Business continuity monitoring — know before your customers do.