What is a 502 Bad Gateway Error?
A 502 Bad Gateway error means that an edge server or reverse proxy (such as Cloudflare, Nginx, or AWS CloudFront) received an invalid response from the upstream origin server. This is a server-side problem — not caused by your device or Wi-Fi connection.
Is This Error on Your Side or the Website’s Side?
A 502 error almost always originates from the website’s server infrastructure. When origin application servers crash, freeze, or drop connections under heavy load, edge reverse proxies return HTTP status 502.
Common Causes of 502 Bad Gateway
- The origin web server crashed or is overloaded with traffic spikes
- A reverse proxy cannot communicate with backend PHP-FPM or Node.js workers
- DNS misconfiguration between the CDN and origin IP
- Firewall or security rules (WAF) blocking backend server communication
- Deployment or database migration in progress
How to Fix a 502 Bad Gateway — User Troubleshooting Steps
- Force reload the page — press
Ctrl+F5(Windows) orCmd+Shift+R(Mac) to bypass cached responses. - Check if the site is down for everyone — check the live status on IsDownNow.
- Test in an Incognito / Private window — rules out stale cookies or browser extensions.
- Flush your local DNS cache: Run
ipconfig /flushdns(Windows) orsudo dscacheutil -flushcache(Mac). - Switch to a public DNS provider: Test using Cloudflare DNS (1.1.1.1) or Google DNS (8.8.8.8).
- Disable VPN or proxy connections to rule out intermediary route drops.
- Wait 5 to 10 minutes — most 502 errors resolve automatically as web applications recover or auto-scale.
Check Active Disruptions
If you suspect an outage is affecting other users, check our Live Outage Radar for 300+ monitored services.