Error Codes Wiki

HTTP 522 Cloudflare — Connection Timed Out to Origin

Critical5xx server error

Overview

Cloudflare error 522 means Cloudflare could not establish a TCP connection to the origin web server within the timeout period.

Key Details

  • 522 is a Cloudflare-specific status code
  • Cloudflare could not reach the origin server at all (TCP level failure)
  • Different from 524 where the connection succeeds but the response takes too long
  • The origin server may be down, overloaded, or blocking Cloudflare IPs
  • Cloudflare waits 15 seconds for a TCP connection before returning 522

Common Causes

  • Origin server is completely down or unresponsive
  • Origin server firewall blocking Cloudflare IP addresses
  • Origin server CPU/RAM overloaded and unable to accept new connections
  • Incorrect origin IP configured in Cloudflare DNS settings
  • Hosting provider network issue preventing inbound connections

Steps

  1. 1Verify the origin server is running: SSH in and check web server status
  2. 2Whitelist Cloudflare IP ranges on origin firewall: download from cloudflare.com/ips
  3. 3Check origin server resource usage: top, htop, or hosting control panel
  4. 4Verify the origin IP in Cloudflare DNS settings matches your actual server IP
  5. 5Contact hosting provider if the server appears up but Cloudflare cannot reach it

Tags

http522cloudflaretimeoutorigin-down

More in 5xx Server Error

Frequently Asked Questions

522 means the TCP connection itself failed (server unreachable). 524 means the connection worked but the HTTP response took too long.