Cloudflare-branded 502 Bad Gateway / 504 Gateway Timeout ("cloudflare" footer)
A plain-looking 502/504 page with “cloudflare” at the bottom comes from Cloudflare’s network itself (or an origin response it couldn’t use), not your server’s error page.
Seen on:
Cloudflare
Meaning
If the page is Cloudflare-branded, either Cloudflare had a temporary problem, or your origin returned an invalid/empty response. If it’s your server’s own 502/504 page (nginx/Apache), the problem is behind Cloudflare (PHP-FPM, upstream app).
Common causes
- Origin returning malformed/empty responses or resetting connections
- Temporary Cloudflare edge issue (check status)
- Origin firewall/rate limiting Cloudflare IPs intermittently
⚡ Quick fix
- Check cloudflarestatus.com
- Compare with a direct request to the origin
- Allowlist Cloudflare IP ranges on the origin firewall
Detailed fix by platform
Shell
- bash
curl -sI https://example.com | grep -iE '^(HTTP|server|cf-ray)' curl -sI --resolve example.com:443:ORIGIN_IP https://example.com | head -1
How to diagnose
- Branding — Cloudflare page or your server’s?
- Origin — Direct request result
- Status — Cloudflare incident?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Cloudflare
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026