Website error guides / Cloudflare

Cloudflare error 520: web server returned an unknown error

In short: Cloudflare reached your server, but the reply it got back was empty, cut off or not a valid web page. Cloudflare itself is working; the problem is on your own server.

Common causes

How to fix it

  1. Open the site directly on the server’s IP address, bypassing Cloudflare, to see the real error.
  2. Check the web server’s error log and the application log around the time of the error.
  3. Restart the web server and the application (for example PHP-FPM).
  4. Make sure the server’s firewall allows Cloudflare’s IP ranges.

Who to contact: your hosting provider or web developer, not Cloudflare.

Know before your visitors do

PingTurret checks your site from several locations every minute. When it goes down, the alert says the likely cause and who to contact. Free for up to 20 monitors.

Related errors