General

Troubleshooting Cloudflare Errors

Updated November 2026 10,468 views 5 min read
General | Updated November 2026

When your site uses Cloudflare as a CDN or proxy, error pages may come from Cloudflare rather than your hosting server. Cloudflare errors are numbered in the 5xx and 10xx ranges and each has a different cause. This guide covers the most common Cloudflare errors and how to troubleshoot them with your Ultra Web Hosting account.

01. Cloudflare vs Origin Errors

Cloudflare sits between visitors and your hosting server. When Cloudflare can't reach your server or your server returns an unexpected response, Cloudflare generates its own error page. The key to troubleshooting is figuring out which side has the problem.

Bypass test: Edit your local hosts file (or use curl with --resolve) to point your domain directly to your Ultra Web Hosting server IP, bypassing Cloudflare. If the site works directly, the issue is between Cloudflare and your server. If it doesn't work directly either, the issue is on your server.

02. Error 520: Web Server Returned an Unknown Error

Cloudflare connected to your server but received an empty, malformed, or unexpected response. Common causes:

PHP crash or fatal error - Your script crashed before sending any HTTP headers. Check error_log in your site's directory.

ModSecurity block - ModSecurity dropped the connection. Check Apache error logs for ModSecurity entries.

Response header too large - Cloudflare limits response headers to 32KB. Large cookie headers can trigger this.

Fix: Check your site's error_log and the Apache error log. The 520 is Cloudflare's way of saying "your server said something I didn't understand."

03. Error 521: Web Server Is Down

Cloudflare couldn't connect to your server at all. Your web server (Apache/nginx) is either stopped or refusing connections.

Fix: Verify the web server is running. Check with upordown.ultrawebhosting.com. If the server is down, contact support. Also check that Cloudflare's IP ranges aren't blocked by the server firewall.

04. Error 522: Connection Timed Out

Cloudflare's TCP connection to your server timed out. The server is reachable but didn't respond within 15 seconds. Causes:

Server overloaded - Apache is busy processing other requests and can't accept new connections. Check server load and resource usage.

Firewall blocking Cloudflare IPs - CSF or iptables may be rate-limiting or blocking Cloudflare's IP ranges. Whitelist Cloudflare IPs in the firewall.

Network issues - Routing problems between Cloudflare's data center and your server.

Fix: Check if Cloudflare IPs are whitelisted in CSF (csf.allow). See our Cloudflare setup guide for the correct firewall configuration.

05. Error 523: Origin Is Unreachable

Cloudflare couldn't resolve the DNS for the origin server, or the origin IP address is invalid. This usually means the Cloudflare DNS records are pointing to the wrong IP.

Fix: Log in to your Cloudflare dashboard and verify the A record points to your Ultra Web Hosting server IP. Check the IP in your welcome email or cPanel's left sidebar.

06. Error 524: A Timeout Occurred

Cloudflare connected to your server and the server accepted the request, but it took longer than 100 seconds (on the free/pro plan) to respond. Common for long-running PHP scripts, large file uploads, or database-heavy operations.

Fix: Optimize the slow script. Increase PHP max_execution_time. For operations that genuinely need more time, consider running them via CLI/cron instead of through the web. Cloudflare Enterprise plans allow custom timeout values.

07. Error 525/526: SSL Handshake Failed

Cloudflare couldn't establish an SSL connection with your origin server. This happens when Cloudflare's SSL mode is set to "Full" or "Full (Strict)" but your server doesn't have a valid SSL certificate.

Fix: Ensure your Ultra Web Hosting account has an active SSL certificate (AutoSSL provides one free). In Cloudflare, set SSL mode to "Full (Strict)" if you have a valid certificate, or "Full" if using a self-signed cert. Never use "Flexible" as it creates a redirect loop. See our SSL guide.

08. Error 1000 Series

Error 1000 (DNS points to prohibited IP) - Your Cloudflare DNS is pointing to a Cloudflare IP instead of your origin server IP. Fix the A record.

Error 1001 (DNS resolution error) - Cloudflare can't resolve the hostname. Check that the DNS record exists in Cloudflare.

Error 1006/1007/1008 (Access denied) - Cloudflare blocked the visitor based on your firewall rules, rate limiting rules, or country-based access rules. Check your Cloudflare Security settings.

Error 1015 (Rate limited) - The visitor triggered a Cloudflare rate limiting rule. Review your rate limiting configuration in Cloudflare's Security section.

Error 1016 (Origin DNS error) - CNAME cross-user DNS resolution error. Usually a Cloudflare configuration issue.

Need Help With Cloudflare?

If you're seeing persistent Cloudflare errors, we can check the server side while you check the Cloudflare side. Include the Cloudflare Ray ID from the error page in your ticket.

Open a Support Ticket

Frequently Asked Questions

What do the Cloudflare 5xx errors mean?

The Cloudflare 52x errors all describe a problem between Cloudflare and your origin server. A 520 is an invalid response, 521 means the server refused the connection or is down, 522 is a connection timeout, 523 is an unreachable origin (usually a wrong origin IP), 524 is a response that took too long, and 525 or 526 are SSL handshake or certificate failures. The visitor-to-Cloudflare leg is fine in all of these.

How do I know if a Cloudflare error is my fault or Cloudflare's?

Bypass Cloudflare and request your site directly on its origin IP, using curl with the --resolve option or a temporary hosts-file entry. If the same failure happens direct to the origin, the fault is on the server side. If the site works direct but fails through Cloudflare, the issue is in your Cloudflare configuration such as DNS, SSL mode, or firewall rules.

What is the first thing to check for any Cloudflare 5xx error?

Note the Cloudflare Ray ID on the error page, then check your server. For 520, 521, and 522 look at Apache, your site error_log, and the firewall. For 523 check the origin IP in your Cloudflare DNS. For 524 find the slow request. For 525 and 526 confirm your origin SSL certificate and Cloudflare SSL mode. The Ray ID lets support match the exact failed request to a log line.

Which Cloudflare SSL mode should I use with UWH hosting?

Use Full (strict). UWH AutoSSL installs a valid certificate on your origin, so Full (strict) encrypts and validates the Cloudflare-to-origin connection. Flexible mode leaves that leg unencrypted and commonly causes redirect loops, so avoid it.

Quick Recap: Cloudflare Error Troubleshooting

  1. Test bypassing Cloudflare - Hit your server IP directly to isolate the problem
  2. 520/521/522 - Server-side issues: check Apache, error logs, and firewall
  3. 523 - Wrong origin IP in Cloudflare DNS records
  4. 524 - Script timeout: optimize the slow operation or increase PHP limits
  5. 525/526 - SSL mismatch: ensure your origin has a valid certificate and Cloudflare SSL mode matches

Last updated November 2026 · Browse all General articles

Share: X in Reddit f Email
  • 4 Users Found This Useful

Was this answer helpful?

Related Articles

How do I hide my domain WHOIS information?

General | Updated November 2026 When you register a domain name, your contact information...

How to Speed Up Your Website

Website Tools & SEO | Updated March 2026 A slow website loses visitors and hurts search...

How do I cancel my account?

General | Updated November 2026 If you need to cancel your hosting account with Ultra Web...

Subdomain Times Out or Not Loading

Errors & Troubleshooting | Updated November 2026 If your subdomain is timing out or not...

Cloudflare Error 521: Web Server Is Down

Errors & Troubleshooting | Updated November 2026 Cloudflare Error 521: Web Server Is Down...



Save 30% on web hosting - Use coupon code Hosting30