when you turn on cloudflare, the site stops working Error code 522

when you turn on cloudflare, the site stops working Error code 522

Hi,

A 522 error happens when a TCP connection to the web server could not be established. This typically happens when our requests to the origin (your webserver) get blocked. Here is what I recommend in order to ensure all requests from Cloudflare are accepted by your server:

  1. Make sure that you’re not blocking Cloudflare IPs in .htaccess, iptables, or your firewall.
  2. Make sure your hosting provider isn’t rate limiting or blocking IP requests from the Cloudflare IPs and ask them to allowlist the IP addresses here: IP Ranges.
  3. Make sure the selected SSL option in the Overview tab of the Cloudflare SSL/TLS app is compatible with your hosting service configuration - What do the SSL options mean?

If you are seeing 522 errors in certain locations only, it means you likely forgot to allowlist one of our ranges that corresponds to these locations, so double check to ensure all our IPs are allowlisted appropriately.