What Does 502 Bad Gateway Mean? Explained in Plain English
502 Bad Gateway means the server you connected to was acting as a middleman (a gateway or proxy), and the server behind it gave a broken or no response. In plain terms: the front desk called the back office, and the back office did not pick up properly.
Most modern websites sit behind services like Cloudflare, load balancers or reverse proxies. Your request goes to that front layer first, which forwards it to the real (origin) server. A 502 means that chain broke at the origin: it crashed, was overloaded, restarted at the wrong moment, or answered with something the gateway could not understand. It is a server-side problem — almost never something wrong with your device.
Where you will see it
- The website's origin server is overloaded or has crashed
- The server is restarting or being updated at that moment
- A firewall or misconfiguration is blocking the gateway from reaching the origin
- Temporary network trouble between the gateway and the origin
How to read it & respond
- Wait a minute and refresh. Most 502s are brief. Wait 30–60 seconds and reload — often the server recovers on its own.
- Check whether the site is down for everyone. Search the site's name on social media or a status-check service. If everyone sees 502, only the site owner can fix it.
- Clear your browser cache or try another browser. Occasionally your browser holds a bad cached response. A private/incognito window is the fastest test.
- Restart your router if every site shows 502. If many unrelated sites give gateway errors, the problem may be your own connection or DNS. Restart the router and try mobile data to compare.
For website owners, a recurring 502 is a capacity or configuration warning: the origin server is running out of memory, its PHP/app workers are saturated, or the gateway timeout is too short for slow pages. It rarely fixes itself permanently.
Frequently asked questions
Is 502 Bad Gateway my fault?
Almost never. It means the website's own servers failed to talk to each other. Your only job is to wait and retry.
What is the difference between 502 and 503?
502 means the gateway got an invalid response from the origin. 503 means the service is unavailable — the server knows it cannot help right now, usually due to overload or maintenance.
How long does a 502 error last?
Anywhere from a few seconds to a few hours, depending on the cause. Brief ones during traffic spikes are common and clear by themselves.