Smart Home & Tech
HTTP 502 Bad Gateway: What It Means and How to Troubleshoot
Confirm another site still loads, then try the same address on a phone. A 502 on both is their gateway, not your router.
Quick meaning
A gateway or proxy server received an invalid response from an upstream server while trying to fulfill the request.
| Error | HTTP 502 |
|---|---|
| Family | Server |
Safe first actions
- Refresh the page after a short wait
- Try a different browser or device
- Clear browser cache and cookies for the site
- Check a status page like DownDetector
- Restart router and modem
- Disable browser extensions temporarily
What not to do
- Reinstall operating system or browser
- Change DNS servers expecting a fix
- Submit sensitive data on the error page
- Assume the site is compromised
When the website or provider must fix it
The website operator or hosting provider must fix the upstream service, proxy configuration, network connectivity, or timeout settings. Visitors cannot resolve the root cause.
HTTP 502 means a gateway or proxy in front of the site received an invalid response from an upstream server while trying to fulfill the request. Your browser reached that gateway. The breakdown is between their machines. It is not a bad address you typed. A timeout while that gateway waited is 504. The site’s own application crashing is often 500. A deliberate “not taking traffic” answer is 503. People mix these up because the pages look similar. The number is the part to write down.
Step 1: See whether it is only you
- Wait a minute and reload once. A restart on their side can clear a 502 quickly. Do not reload in a loop.
- Open a different site. If nothing on the web loads, this is not a 502 problem. Use Chrome not loading pages or the Wi-Fi guide.
- If other sites load, open this same address on a phone using mobile data. The same 502 on the phone means their gateway is failing for more than your PC.
Step 2: A browser test only if the phone worked
If the phone loads the page and this PC shows 502, try a private window once. Extensions rarely create a genuine 502, but a broken proxy setting in one browser can. If the private window works, turn extensions off one at a time in the normal window. If you configured a proxy yourself, turn that proxy off for one test and put it back. Do not install a “header fixer.” Do not clear cookies for every site. A true 502 does not live in a cookie.
Restarting your router does not repair their upstream server. Do it only when every site fails, and then you are following the Wi-Fi guide, not this one. A browser page that says you are offline, with no HTTP status, is also not a 502. Write the number down only when the error page or the network list actually shows 502.
Step 3: Their notice
Use a status page the site publishes, or a support page you have used before. Skip crowd-sourced detectors. They lag, and they are not that operator’s log. If you cannot find a status page, one report to the contact they publish is enough: the address, the time, the code 502, and that a phone on mobile data saw it too. Then wait. Checking every few seconds is how a 502 picks up a 429 on top.
Step 4: If the site is yours
Read the gateway’s error log and the upstream application’s log for the same minute. You are looking for a process that died, a bad header from the app, or a proxy pointed at the wrong port. Fix that on the host you already administer. Do not raise every timeout in a copy-pasted file from a different product, and do not turn detailed errors on for the public site. Visitors do not need your stack traces.
What you should be able to point at
- 502 written down, separate from 500, 503, and 504.
- One reload. Another website tested.
- Phone on mobile data tested before any PC cleanup.
- Router left alone unless every site is down.
- Report sent once, without a password or a cookie.
Example: one news site, two devices
A news article returns 502. The laptop reloads once and gets 502 again. A phone on mobile data gets 502 for the same article. A webmail tab on the laptop still loads. They check the news site’s own status link in the footer and wait. They do not clear every cookie and they do not reboot the home router. A 502 that appeared only in one browser, while the phone and a private window worked, would have stayed on the extension and proxy test instead of an outage report.
Related guides
Last updated: October 28, 2026
Last reviewed October 22, 2026. Suggest a correction
Questions readers ask
Is 502 the same as 504?
No. 502 means the gateway did not get a response it could use. 504 means it gave up because the wait ran out. You still cannot repair either one from home when both devices show it.
Will clearing the cache help?
Not when the phone shows 502 too. Cache and cookies are local. The bad reply is between their servers.
Should I restart my router?
Only if other sites are down as well. A single site’s 502 is not a home-router fault.
An extension blocker is on. Did it cause this?
Test a private window. If that window also returns 502, the extension is not the cause. Leave security tools on either way.
I run the proxy. What should I change first?
The log line for this request, then the upstream process it names. Do not start by publishing a longer timeout you copied from an unrelated guide.
Sources and methodology
Claims that depend on an outside authority are tied to the references below. Product details change. Confirm the current specification sheet before you buy or install anything.
- RFC 9110: 502 Bad Gateway — RFC Editor (standard), accessed October 28, 2026. Primary HTTP or DNS specification for the status or response behavior discussed in this article.
- MDN: 502 Bad Gateway — Mozilla Developer Network (documentation), accessed October 28, 2026. Technical explanation of this HTTP response status and its normal meaning.
Information on this site is for general educational purposes and is not professional advice.
Parent topic: Smart Home & Tech