Hi,
A 521 means that Cloudflare is not able to establish a connection with your origin web server, and seeing a connection refused when establishing a TCP connection, over the port you are connecting either 80/443 - depending on your SSL mode - Encryption modes · Cloudflare SSL/TLS docs
Flexible we connect over port 80, Full/Full Strict connects over port 443.
Ensuring that your origin and any security devices in front of your server allow our Cloudflare IP’s to connect to these ports, should prevent you from experiencing a 521 - IP Ranges
Hope this helps!