Cloudflare Error 502 / 521 Web Server Is Down
Cloudflare edge could not establish TCP/TLS connection to origin server on 80/443.
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.1.0
Identifier: Cloudflare Error 502 / 521 Web Server Is Down
Platform: Cloud
Common Root Causes:
- Cloudflare edge could not establish TCP/TLS connection to origin server on 80/443.
Interactive Diagnostic Checklist
Verified Solutions:
- Ensure Nginx is running, listening on 443, and firewall allows Cloudflare IP ranges.
Safe Diagnostic Command:
curl -I --resolve domain:443:<origin-ip> https://domain
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.
Technical Explanation
Cloudflare edge could not establish TCP/TLS connection to origin server on 80/443. Recommended diagnostic: `curl -I --resolve domain:443:<origin-ip> https://domain`. Remediation: Ensure Nginx is running, listening on 443, and firewall allows Cloudflare IP ranges.
Worked Examples
- Run `curl -I --resolve domain:443:<origin-ip> https://domain` to verify root cause before applying the remediation.
Limitations & Assumptions
- Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.
Source References & Verification
Resource ID: err-http-502-cloudflare-origin-down · Independently verified: 2026-11-25