502 Bad Gateway error is an HTTP status code that means that an invalid response has been received from another server on the Internet.
The 502 Bad Gateway error appears in the internet browser window, as do web pages.
Each website can customize the 502 Bad Gateway. Although it is quite uncommon, this error is described differently by different web servers. Below you can see some common ways:
502 Bad Gateway
502 Service Temporarily Overloaded
Temporary Error (502)
502 Proxy Error
502. That's an error
Bad Gateway: The proxy server received an invalid response from an upstream server
HTTP Error 502 - Bad Gateway
The famous “fail whale” error in Twitter, which says Twitter is over, is actually a 502 Bad Gateway error (although a 503 error would make more sense).
When Google services, such as Google Search or Gmail, have a 502 bad gateway, server errors are often displayed on the screen, or sometimes only 502.
Cause of 502 Bad Gateway Errors
Bad Gateway errors are often caused by problems that you have no control over between online servers. Sometimes, however, there is no real problem, but your browser thinks that one is due to a problem with your browser, a problem with your home networking equipment or some other reason in your control.
Microsoft IIS web servers often provide more information about the cause of a particular 502 Bad Gateway error by adding an extra digit after 502, as in HTTP Error 502.3-Web server received an invalid response when acting as a gateway or proxy, which means Bad Gateway: Forwarder Connection Error (ARR). A complete list can be seen here.
An HTTP Error 502.1-Bad Gateway error refers to a CGI application timeout problem and is better to fix a 504 gateway timeout problem.
The 502 Bad Gateway error is often a network error between internet servers, so your computer or internet connection would not be a problem.
Since there may be something wrong at your end, however, here are some fixes to try:
Try to load the URL again by pressing F5 or Ctrl + R on your keyboard or by clicking on the button for refresh / reload.
Although the 502 Bad Gateway error usually shows a networking error outside your control, it may be extremely temporary. It is often successful to try the page again.
Start a new browser session by closing all windows of the open browser and opening a new one. Then try again to open the web page.
The 502 error you received may have been caused by a computer problem that occurred sometime during your browser use. The problem could be solved by simply restarting the browser program itself.
Clean the cache of your browser. Outdated or corrupted files stored by your browser may cause 502 problems with the Bad Gateway.
If this is the cause, removing the cached files and retrying the page will solve the problem.
Delete cookies from your browser. For similar reasons as mentioned in the case of cached files, a 502 error could be fixed by clearing stored cookies.
If you don’t want to clear all your cookies, you can first try to remove only those cookies associated with the 502 error. It’s best to remove them all, but first trying the clearly applicable one(s) won’t hurt.
Start the Safe Mode browser: Firefox, Chrome or Internet Explorer. Running a browser in Safe Mode means running it without add-ons or extensions, including toolbars, with default settings.
If the 502 error does not appear when your browser is running in Safe Mode, you know that the problem is caused by some browser extension or setting. Return the default browser settings and/or disable browser extensions selectively to find the root cause and fix the problem permanently.
The Safe Mode of a browser is similar to the Safe Mode in Windows, but it’s not the same. To run any browser in its specific “Safe Mode,” you don’t need to start Windows in Safe Mode.
Try a different browser. Firefox, Chrome, Opera, Internet Explorer and Safari are popular browsers, among others.
If an alternative browser does not cause a 502 Bad Gateway error, you now know that the problem is caused by your original browser. If you followed the troubleshooting advice above, it would now be time to reinstall your browser and see if it fixes the problem.
Download Microsoft Forefront Threat Management Gateway (TMG) 2010 Service Pack 1 software update 1 if you have installed MS Forefront TMG SP1 and receive the message Error Code: 502 Proxy Error. The connection to the network failed. (1790) or similar message when a web page is accessed.
This is not a common solution for 502 messages with proxy errors and applies only in this particular situation. Forefront TMG 2010 is a package of business software and you’d know if you’ve installed it.
Reboot your computer. Some temporary computer problems and how it connects to your network may cause 502 errors, especially if you see the error on more than one website. A reboot would help in these cases.
Restart networking equipment. Issues with your modem, router, switches or other network devices may cause 502 bad gateways or other 502 errors. A simple restart of these devices might be helpful.
The order in which you turn off these devices is not especially important, but be sure to turn them on from the outside. For more detailed help in restarting your equipment, check out this link above.
Change your DNS servers on your router, computer or device. Some errors in the Bad Gateway are caused by temporary DNS server problems.
If you haven’t changed them before, the DNS servers that you have configured are probably the ones that your ISP automatically assigns. Fortunately, you can choose a number of other DNS servers for your use. For your options, see our list of Free & Public DNS Servers.
It could also be a good idea to contact the website directly. Probably, the website administrators are already working to correct the cause of the 502 Bad Gateway error, but feel free to let them know.
For a list of contacts for popular websites, see our Contact Information page. Most websites have social networking accounts for their support. Some even have contacts by telephone and email.
If you suspect that everyone has a website, especially a popular one, it is often very helpful to check Twitter for chatting about the outage. The best way to do this is to search for Twitter as in #cnndown or #instagramdown. If social media is not helpful, there are other ways to see if a website is down.
Contact your service provider on the Internet. If your browser, computer and network all work and the website reports that the page or site works for them, the 502 bad gateway problem may be caused by a network problem for which your ISP is responsible.
See How to Talk to Tech Support for tips on talking to your ISP about this problem.
Come back afterwards. The 502 Bad Gateway error message is almost certainly a problem with your ISP or the network of the website at this point in your troubleshooting-one of the two parties may even have confirmed that if you contacted them directly. You’re not the only one who sees the 502 error, so you’ll have to wait for the problem to be solved.
Also Read: Fix Hulu Error Code 301
Other Errors Like 502 Bad Gateway
The 502 Bad Gateway error is linked to a number of other errors: 500 Internal Server Error, 503 Service Not available, and 504 Gateway Timeout.
There are also a number of HTTP status codes on the client side, including the very common 404 Not Found error, which can be found in this list of errors in the HTTP status code.