HTTP 502 Bad Gateway is an HTTP status code that indicates that a server on the Internet has received an invalid response from another server. The error 502 Bad Gateway is completely independent from your configuration, which means that you can see one on any browser, on any operating system and on any device.

The 502 Bad Gateway error is displayed in the Internet browser window, just like Web pages do.

How Error 502 Appears

502 HTTP Bad Gateway can be customized by each website. Although it is quite rare, different Web servers describe this error differently.

Here are some common ways you might see it:

  • 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
  • 502. That’s an error
  • Bad Gateway: The proxy server received an invalid response from an upstream server
  • HTTP Error 502 – Bad Gateway

Twitter’s famous “fail whale” error that says Twitter is too full is actually a 502 Bad Gateway error (although a 503 error would make more sense).

An invalid Gateway error received in Windows Update generates an error code 0x80244021 or the message WU_E_PT_HTTP_STATUS_BAD_GATEWAY.

When Google services, such as Google Search or Gmail, encounter an invalid 502 Gateway, they often show server errors, or sometimes only 502, on the screen.

Causes of Error 502 HTTP Bad Gateway

Bad Gateway errors are often caused by problems between online servers over which you have no control. However, sometimes, there is no real problem, but your browser thinks there is one because of a problem with your server, a problem with the connection or something else under your control.

Microsoft IIS web servers often provide more information on the cause of a specific 502 Bad Gateway error by adding an additional figure after 502, such as for the HTTP Error 502.3 error – Web server received an invalid response while acting as a gateway or proxy, the which means Bad Gateway: Forwarder Connection Error (ARR). You can see a complete list here.

An HTTP Error 502.1 – Bad Gateway refers to a CGI application timeout problem and it is best to resolve the problem as a 504 gateway timeout error.

How to Fix a 502 HTTP Bad Gateway Error

The 502 Bad Gateway error is often a network error between servers on the Internet, which means that the problem would not be with the computer or the Internet connection. However, since something may be wrong, here are some solutions to try:

  1. Try to load the URL again by pressing F5 or Ctrl + R on the keyboard or clicking the Update / Reload button. While the 502 Bad Gateway error usually indicates a network error outside of your control, it could be extremely temporary. Reloading the page again is often successful.
  2. Start a new browser session by closing all open browser windows and opening a new one. Then try to open the web page again. It is possible that the 502 error you received was caused by a problem on your computer that occurred while using your browser. A simple restart of the browser itself may solve the problem.
  3. Clear your browser cache. Obsolete or damaged files stored by the browser may cause 502 HTTP Bad Gateway Error. Removing those cached files and attempting to reload the page will solve the problem if that is the cause.
  4. Delete your browser cookies. For reasons similar to those mentioned above with the cached files, deleting the stored cookies may correct a 502 error. If you prefer not to delete all your cookies, you may first try to remove only those cookies related to the site on which you are experiencing the error 502. It is best to remove them all but it won’t hurt to try the clearly applicable ones first.
  5. Start the browser in safe mode: Firefox, Chrome or Internet Explorer. Restarting a browser in safe mode means working with the default settings, without add-ons or extensions, including toolbars. If the 502 error no longer appears when working with the browser in safe mode, then some browser extensions or settings are the cause of the problem. Restore default browser settings and/or selectively disable browser extensions to find the root cause and fix the problem permanently. A browser’s Safe Mode is similar in idea to Windows Safe Mode, but it’s not the same. It is not necessary to start Windows in Safe Mode to run a browser in its particular “Safe Mode”.
  6. Try another browser. The most popular browsers include Firefox, Chrome, Opera, Internet Explorer and Safari, among others. If an alternative browser doesn’t show you the 502 Bad Gateway error, you now know that your original browser is the source of the problem. Assuming you followed the troubleshooting tips above, now would be the time to reinstall the browser and see if that fixes the problem.
  7. Download software update 1 for Microsoft Forefront Threat Management Gateway (TMG) 2010 Service Pack 1 if you have installed MS Forefront TMG SP1 and receive the Error Code: 502 Proxy Error message. The network logon failed. (1790) or a similar message when accessing a web page. This is not a common solution to proxy error messages 502 and only applies in this particular situation. Forefront TMG 2010 is a business software package and you would know if you have it installed.
  8. Restart your computer. Some temporary problems with your computer and the way it connects to your network may cause error 502, especially if you see the error on more than one website. In such cases, a restart would be useful.
  9. Restart the network device. Problems with modems, routers, switches or other network devices may cause 502 Bad Gateway or other 502 errors. A simple restart of these devices may help.
  10. Change your DNS servers, on your router or on your computer or device. Some Bad Gateway errors are caused by temporary problems with DNS servers. If you have not previously modified them, the DNS servers that you have configured at the moment are probably those assigned automatically by your ISP. Fortunately, there are several other DNS servers that you can choose from. See our list of free and public DNS servers.
  11. Contacting the website directly may also be a good idea. Probably, assuming they are wrong, the website administrators are already working to correct the cause of the 502 Bad Gateway error.
  12. Contact your Internet service provider. If the browser, computer, and network all work and the website report that the page or site is functioning properly, the 502 Bad Gateway problem may be caused by a network problem that the ISP is responsible for.
  13. Come back later. At this point, the 502 Bad Gateway error message is almost certainly a problem with your ISP or with the website’s network. However, you are not the only one to see the 502 error and therefore you will have to wait until the problem will not be solved.


Show us some love by Sharing! TechLector wants to hear from you, use the comment box below…

Leave A Reply

Please enter your comment!
Please enter your name here