#How is 521 vs 522 determined?

5 messages · Page 1 of 1 (latest)

minor kayak
#

From everything I read online including cloudflares own docs on 521 and 522 it seems that both can be achieved by the server being offline/down. If the server is offline/down how is it determined whether it's 521 or 522 then?

pure sigilBOT
#
Support AI

According to the Cloudflare documentation, both Error 521 and Error 522 can occur when the server is offline or down. However, the key difference lies in the specific circumstances that trigger each error.

Error 521: Web Server is Down (https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/error-521/) occurs when the origin web server refuses connections from Cloudflare. This can happen when the server is offline or down, but it can also occur when the server is blocking or rate-limiting Cloudflare's IP addresses.

Error 522: Connection Timed Out (https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/error-522/) occurs when Cloudflare times out contacting the origin web server. This can happen when the server is offline or down, but it can also occur when the server is taking too long to respond to Cloudflare's requests.

In the case where the server is offline or down, Cloudflare's system will attempt to connect to the server and wait for a response. If the server does not respond within a certain time frame (typically 90 seconds), Cloudflare will return an Error 522. However, if the server is actively refusing connections from Cloudflare (e.g., due to IP blocking or rate limiting), Cloudflare will return an Error 521.

In summary, the distinction between Error 521 and Error 522 when the server is offline or down depends on the specific behavior of the server. If the server is simply not responding, Cloudflare will return an Error 522. If the server is actively refusing connections from Cloudflare, Cloudflare will return an Error 521.

minor kayak
#

I'm not too sure I understand. If the server is down how can it refuse connections from cloudflare to make it an error 521?

left sun
minor kayak