How You Might See the 502 Error
The 502 Bad Gateway error message can be customized by each website. While this isn't very common, keep in mind that a 502 error may present itself in more ways than the common ones listed below:
- "502 Bad Gateway"
- "502 Service Temporarily Overloaded"
- "Error 502"
- "Temporary Error (502)"
- "502 Proxy Error"
- "502 Server Error: The server encountered a temporary error and could not complete your request."
- "HTTP 502"
- "Bad Gateway: The proxy server received an invalid response from an upstream server."
- "HTTP Error 502 - Bad Gateway"
The 502 Bad Gateway error displays inside the Internet browser window, just as web pages do.
Twitter's famous "fail whale" error that says Twitter is over capacity is actually a 502 Bad Gateway error (even though a 503 Error would make more sense).
A Bad Gateway error when received in Windows Update generates a 0x80244021 error code or the message WU_E_PT_HTTP_STATUS_BAD_GATEWAY.
502 Bad Gateway errors are completely independent of your particular setup, meaning that you could see one in any browser, on any operating system, and on any device.
Cause of 502 Bad Gateway Errors
The 502 Bad Gateway error is an HTTP status code that means that one server received an invalid response from another server that it was accessing while attempting to load the web page or fill another request by the browser.
Note: Microsoft IIS web servers often give more information about the cause of a particular 502 Bad Gateway error by adding an extra digit after the 502 as in HTTP Error 502.3 - Web server received an invalid response while acting as a gateway or proxy which means Bad Gateway: Forwarder Connection Error (ARR). You can see a complete list here.
How To Fix the 502 Bad Gateway Error
The 502 Bad Gateway error is usually a network error between servers on the Internet, meaning the problem isn't typically with your computer or Internet connection. However, it is possible that there's something wrong on your end and we'll work through those possibilities below.
- Try loading the URL again by pressing F5 on your keyboard, or by clicking the refresh/reload button.
While the 502 Bad Gateway error is usually indicating a networking error outside of your control, it could be extremely temporary. Trying the page again will often be successful.
- Start a new browser session by closing all open browser windows and then opening a new one. Then try opening the webpage again.
It's possible that the 502 error you received was due to an issue on your computer that occurred sometime during this use of your browser. A simple restart of the browser program itself could solve the problem.
- Clear your browser's cache. Outdated or corrupted files that are being stored by your browser could be causing 502 Bad Gateway issues.
Removing those cached files and trying the page again will solve the problem if this is the cause.
- Delete your browser's cookies. For similar reasons as mentioned above with cached files, clearing stored cookies could fix a 502 error.
Note: If you'd rather not clear all of your cookies, you could first try removing only those cookies related to the site you're getting the 502 error on. It's best to remove them all but it won't hurt to try the clearly applicable one(s) first.
- Start your browser in Safe Mode. Running a browser in Safe Mode means to run it with default settings and without add-ons or extensions, including toolbars.
If the 502 error no longer appears when running your browser in Safe Mode, you know that some browser extension or setting is the cause of the problem. Return your browser settings to default and/or selectively disable browser extensions to find the root cause and permanently fix the problem.
Note: A browser's Safe Mode is similar in idea to the Safe Mode in Windows but it is not the same thing. You do not need to start Windows in Safe Mode to run any browser in its particular "Safe Mode."
- Try another browser. Popular browsers include Firefox, Chrome, Internet Explorer, and Safari, among others.
If an alternative browser doesn't produce a 502 Bad Gateway error, you now know that your original browser is the source of the problem. Assuming you've followed the above troubleshooting advice, now would be the time to reinstall your browser and see if that corrects the problem.
- Download Software Update 1 for Microsoft Forefront Threat Management Gateway (TMG) 2010 Service Pack 1 if you have MS Forefront TMG SP1 installed and receive a Error Code: 502 Proxy Error. The network logon failed. (1790) or similar message when accessing a web page.
Important: This is not a common solution to 502 Proxy Error messages and only applies in this particular situation. Forefront TMG 2010 is a business software package and you would know if you have it installed.
- Restart your computer. Some temporary issues with your computer and how it's connecting to your network could be causing 502 errors, especially if you're seeing the error on more than one website. In these cases, a restart would help.
- Restart your networking equipment. Issues with your modem, router, switches, or other networking devices could be causing Bad Gateway or other 502 errors. A simple restart of these devices could help.
Tip: The order you turn off these devices isn't particularly important, but be sure to turn them back on from the outside in. In other words, turn on the outermost hardware on the network first (usually your modem), followed by the device it's connected to (usually your router). Next would be any switch or other device between the router and your computer.
- Contact the website directly. Chances are, assuming they're at fault, the website administrators are already working on correcting the cause of the 502 Bad Gateway error but feel free to let them know about it, especially if you suspect that they may not be.
The best way to find a website's contact information is usually through a WHOIS search, using the domain name (e.g. cnn.com) as your search term.
If the results of that search doesn't reveal an email address, many websites can be contacted via firstname.lastname@example.org, replacing website.com with the actual website name. Contacting them via their social networking page is another option.
- Contact your Internet Service Provider. If your browser, computer, and network is working, and the website reports that the page or site is working for them, the 502 Bad Gateway issue could be caused by a network issue that your ISP is responsible for.
Tip: See How To Talk To Tech Support for tips on talking to your ISP about this problem.
- Come back later. At this point in your troubleshooting, the 502 Bad Gateway error message is almost certainly an issue with either your ISP or with the web site's network - one of the two parties may have even confirmed that for you if you contacted them directly.
Either way, you're not the only one with seeing the 502 error and you'll need to wait until the problem is solved for you.
Errors Like 502 Bad Gateway
The following error messages are related to the 502 Bad Gateway error: