A Cloudflare 522 error means Cloudflare could not establish a timely connection with your origin server. Your server may appear to be online, but Cloudflare may still be unable to connect to it properly.
Common causes include:
- Server firewall blocking Cloudflare IP addresses
- Cloudflare IPs not being whitelisted
- High server load or insufficient resources
- Incorrect DNS records pointing to the wrong server IP
- Network or routing issues between Cloudflare and the origin server
- The web server is running but not accepting connections on the required port
How to Fix It
- Verify that the Cloudflare DNS record points to the correct server IP.
- Make sure your server firewall allows Cloudflare IP addresses.
- Check your server's CPU, RAM, and resource usage.
- Confirm that the web server is running and listening on ports 80/443.
- Check the server's error logs for connection or firewall-related issues.
If the server is online but the 522 error continues, contact your hosting support team so they can check the server firewall, network connectivity, and web-server configuration.