How to Fix 521 Error with Cloudflare in cPanel
Posted about 2 months ago 4kWhat Cloudflare 521 Means
Origin down: Cloudflare could not connect to your origin server at all.
Common Causes
- Server offline or restarted
- Firewall blocking Cloudflare IPs
- DNS pointing to wrong IP
- SSL certificate expired
Troubleshooting Steps
Check Server Status
cPanel → Metrics → Service Status → Verify Apache/Nginx is running.
Whitelist Cloudflare IPs
CSF or host firewall → Allow all Cloudflare IP ranges.
Verify DNS Records
A record must point to correct server IP (not localhost or old IP).
Solutions Table
| Cause | Solution |
|---|---|
| Server down | Restart services or contact host |
| Firewall block | Whitelist Cloudflare IPs |
| Wrong DNS | Update A record |
| SSL expired | Renew certificate |