Status 520/521

Hello, error 520/521 appears quite often. The server has no answers except 200. We created logs. We no longer know where to look for the reason, maybe you can help us?
The server works on https, during the error it says that the connection is not secure. Hope this helps with the question. Could changing DNS for example help with this question?
I understand that you have a lot of such appeals. We wrote to the hosting owner, they logged requests additionally, but nothing was found.
Also, I caught a case when there was such an error, but the request on the server was executed and the data was entered into the database! This means the server is responding.

Error 520: web server returns an unknown error

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


A quick workaround while further investigating 520 errors is to either grey cloud the DNS record in the Cloudflare DNS app or temporarily pause 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 allowed at your origin
  • Headers exceeding 32 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

520 errors are prevalent with certain PHP applications that crash the origin web server.

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

Error 521: web server is down

Error 521 occurs when the origin web server refuses connections from Cloudflare. Security solutions at your origin may block legitimate connections from certain Cloudflare IP addresses.

The two most common causes of 521 errors are:

  • Offlined origin web server application
  • Blocked Cloudflare requests


Contact your site administrator or hosting provider to eliminate these common causes:

  • Ensure your origin web server is responsive
  • Review origin web server error logs to identify web server application crashes or outages.
  • Confirm Cloudflare IP addresses are not blocked or rate limited
  • Allow all Cloudflare IP ranges in your origin web server’s firewall or other security software
  • Find additional troubleshooting information on the Cloudflare Community.
    Also what is the URL?

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.