Skip to content
MtrXTools

Error 520: Web server is returning an unknown error

Cloudflare got an empty or invalid response

Seen in Cloudflare

Cloudflare connected to your origin, but the response was empty or not valid HTTP.

Common causes

  • The origin crashed or reset the connection.
  • Response headers too large (often huge cookies).
  • A firewall on the origin blocking Cloudflare's IPs.

How to fix it

  1. Check origin server logs at the time of the error.
  2. Trim oversized headers and cookies.
  3. Allow Cloudflare's IP ranges on the origin firewall.
Check the origin response

Got a different message? Paste it into the error explainer.

Related errors

All 51 HTTP & CDN errors