Code 520

Unknown error Cloudflare

This is a catch-all response for when a website behind Cloudflare returns something unexpected or something that is not tolerated/interpreted (protocol violation or empty response).

While the 520 error can be triggered by very unique and strange edge-case scenarios, they are generally caused by:

  • Connection resets (following a successful TCP handshake)
  • Headers exceed the Cloudflare header size limit (over 8kb)
  • An empty response from origin
  • An invalid HTTP response
  • Missing response headers from an HTTP response
  • Presence of multiple Content-Length headers