520 Error

A 520 error is a Cloudflare-specific error code for:

“Something is wrong.”

Error 520 occurs when the origin server returns an empty, unknown, or unexpected response to Cloudflare.

Contact your hosting provider or site administrator and request a review of your origin web server error logs for crashes and to check for these common causes:

  • Origin web server application crashes
  • Cloudflare IPs not whitelisted at your origin.
  • Origin web server TCP idle timeouts shorter than 300 seconds
  • Headers exceeding 8 KB (typically due to too many cookies)
  • An empty response from the origin web server that lacks an HTTP status code or response body
  • Missing response headers or origin web server not returning proper HTTP error responses

If 520 errors continue after contacting your hosting provider or site administrator, a web developer should provide the following information to Cloudflare Support:

  • Full URL(s) of the resource requested when the error occurred
  • Cloudflare Ray ID from the 520 error message
  • Output from http://www.example.com/cdn-cgi/trace (replace www.example.com with your hostname and domain where the 520 error occurred)
  • HAR file with Cloudflare enabled on your website
  • HAR file with Cloudflare temporarily disabled

Source: https://support.cloudflare.com/hc/en-us/articles/115003011431#520error