Error 522 – Images Not Loading on My Site

For Workers & Pages, what is the name of the domain?

What is the error number?

522

What is the error message?

Connection timed out

What is the issue or error you’re encountering

Images are not loading due to Error 522 (Connection timed out), making media assets inaccessible.

What steps have you taken to resolve the issue?

Checked server status for possible downtime.
Increased server timeout settings to prevent disconnections.
Verified DNS settings to ensure proper routing.
Disabled proxy mode to test direct access.
Contacted hosting provider for assistance.

What are the steps to reproduce the issue?

Open the website and navigate to an image-heavy page.
Inspect any image element and check for 522 error in DevTools Console.
Try accessing the direct image URL, and it fails to load.

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.

This topic was automatically closed after 15 days. New replies are no longer allowed.