When a proxied site goes down, the question that decides everything else is attribution: Cloudflare’s network, your origin, or the path between them. The runbook is five moves, in order — scope the failure, read the error itself, check cloudflarestatus.com, isolate with cf-ray, and test the origin directly with --resolve — and it ends in one of three actions: fix your stack, open a ticket with Ray IDs attached, or wait out a confirmed upstream incident without thrashing your own config. Ten minutes, no guessing.
What’s happening
Behind a proxy, every failure wears the same face — users see an error on your domain — but the layers fail differently. Cloudflare-generated errors are branded: a Cloudflare-styled page with an error code and a Ray ID at the bottom. The 52x family encodes the edge-to-origin conversation: 521 (origin refused the connection), 522 (connection timed out), 523 (origin unreachable), 524 (origin accepted but never answered in time — the 100-second window), 525/526 (TLS handshake or certificate failure between edge and origin). All of those mean the edge is alive and your origin, network path, or TLS layer is the suspect. A plain origin-styled error page, by contrast, means the whole chain works and your application returned the failure. And a global Cloudflare incident produces errors across unrelated sites simultaneously — which is why scope is the first question, not the last.
What to check first
- Blast radius. One URL, one site, or every zone you run? Your site only, or is your team’s chat also full of other companies’ outage links? A second, unrelated site behind Cloudflare is a free diagnostic instrument — check it.
- What changed in the last hour. Deploys, DNS edits, Cloudflare config changes (the zone Audit Log answers this in one click), certificate renewals. Most “Cloudflare broke” incidents are self-inflicted and time-correlated.
- The error page itself. Cloudflare-branded with a Ray ID, or your own 500 template? This one observation cuts the search space in half.
How to verify
# 1. What does the edge say? Capture status, ray, cache verdict
curl -sI "https://example.com/" | grep -iE "HTTP/|cf-ray|cf-cache-status|cf-mitigated|^server"
# 2. Bypass Cloudflare entirely - talk to the origin by IP
curl -sI --resolve example.com:443:<ORIGIN_IP> "https://example.com/" --max-time 15
# 3. Compare from a second vantage point (different network/region)
# same curl from a VPS or via a colleague - note the cf-ray colo suffix
# 4. Is the origin even listening?
nc -vz <ORIGIN_IP> 443
# 5. What is the origin logging right now?
tail -f /var/log/nginx/access.log /var/log/nginx/error.log
Read it as a truth table. Edge fails + origin direct works: the problem is Cloudflare-side or in the edge-to-origin path — proceed to status page and ticket. Edge fails + origin direct fails: it is you — stand down the Cloudflare theory. Edge works from one vantage point but not another, with different cf-ray colo codes: localized edge or ISP trouble, not a site-wide event. Origin log silent while users see errors: requests are dying before reaching you, which again points at the edge or at DNS.
The fix
- Confirm or eliminate a Cloudflare incident in two minutes. Check cloudflarestatus.com for active incidents and your region’s colos; note that the status page can lag the first minutes of a real event, so pair it with the second-site check and the colo pattern from your
cf-raysamples. Confirmed incident: stop changing things, post your status page, and wait — config-thrashing during an upstream event is how one outage becomes two. - If the origin test failed, work your own stack. Web server down, firewall rule eating 443, expired origin certificate, disk full — ordinary operations. The 522 playbook covers the timeout family; 525/526 handshake failures cover the TLS pair. Fix, then re-run the verification battery through the proxy before declaring victory.
- If the edge fails and the origin is clean, suspect your Cloudflare config before Cloudflare itself. Audit Log first: WAF rule shipped an hour ago, TLS mode flipped, a DNS record proxied that should not be.
cf-mitigated: challengeon the failing response is a security-rule problem with your name on it. Revert the last change and re-test. - Ticket with evidence, not adjectives. If config is clean, origin is clean, and status is green but errors persist: collect three or more Ray IDs with timestamps and colo codes, the exact status codes, and your
--resolveproof that the origin answers. That bundle is the difference between a same-day support answer and a week of “please provide more information.” Plan reality: Free and Pro support is community-and-ticket with slower response; phone/chat and priority handling arrive at Business and Enterprise. Build the evidence bundle regardless — it shortens every queue. - Reach for “Pause Cloudflare on Site” only as a last resort. Overview » Advanced Actions » Pause sends traffic direct-to-origin while keeping DNS hosted. It proves attribution definitively, but it exposes the origin IP, drops WAF and DDoS protection mid-incident, and interacts badly with origin firewalls that only allow Cloudflare ranges. If you pause, have the origin firewall and TLS story ready first.
When this fix is wrong
This runbook assumes the site is proxied; if server: is not cloudflare and there is no cf-ray, you are debugging a direct-to-origin site and Cloudflare was never in the path. It also assumes a binary answer exists — some incidents genuinely straddle layers (an origin overloaded because a Cloudflare cache purge sent it a stampede). When both layers look partly guilty, fix availability first, attribute later.
Common mistakes
- Treating a green status page as an alibi. It reports confirmed, broad incidents — not the first ten minutes, and not every localized colo problem. Your Ray-ID colo pattern is stronger evidence than the dashboard’s colour.
- Changing three things at once. Flip one variable, re-run the same two curls, read, repeat. Parallel changes destroy the evidence you will need for the ticket.
- Forgetting DNS as the third suspect. Expired domain, deleted record, or an NS change mid-propagation produces “Cloudflare is down” reports with a perfectly healthy Cloudflare.
- Not writing down the Ray IDs during the event. After recovery, the error pages are gone and so is your evidence.
Prevention
Turn this page into your team’s literal runbook: the five verification commands in a paste-ready snippet, the truth table printed in the on-call doc, and dual edge-plus-origin monitoring so the attribution question is often answered before a human opens a terminal. If “is it Cloudflare or is it us” keeps eating your evenings, that triage is literally the job of 24/7 Monitoring & Response — book a monitoring and response review.