502 HTTP Bad Gateway error, what is it and how to fix

502 HTTP Bad Gateway error, what is it and how to fix

Correct theErrore 502 HTTP Bad Gateway. THE'Errore 502 HTTP Bad Gateway is an HTTP status code that indicates that a server on the Internet has received an invalid response from another server. The 502 Bad Gateway errors they are completely independent of your configuration, which means you could see one on any browser, any operating system, and any device.


The 502 Bad Gateway error appears in the internet browser window, just like web pages do.



What does Error 502 look like

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

Below 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 on 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 just 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 due to a problem with your server, a problem with the connection, or something else under your control.

Microsoft IIS web servers often provide more information about the cause of a specific 502 Bad Gateway error by adding an additional digit after 502, such as HTTP Error 502.3 - 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 full list here.

An HTTP Error 502.1 - Bad Gateway refers to a CGI application timeout issue and is best resolved as an error 504 gateway timeout.


How to fix a 502 HTTP Bad Gateway Error

The 502 Bad Gateway error is often a network error between servers on the internet, meaning that the problem wouldn't be with your computer or internet connection. However, as it is possible that there is something wrong, here are some solutions to try:

1. Try uploading the URL again by pressing F5 o Ctrl + R on the keyboard or by clicking the Refresh / Reload button. While the 502 Bad Gateway error usually indicates a network error beyond your control, it could be extremely temporary. Reloading the page often succeeds.


2. Start a new browser session by closing all open browser windows and opening a new one. Then try opening 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 could fix the problem.


3. Clear the browser cache. Outdated or corrupted files stored by the browser may cause HTTP Bad Gateway Error 502. Removing those cached files and trying to reload the page will fix the problem if this is the cause.

4. Delete browser cookies. For reasons similar to those mentioned above with cached files, deleting stored cookies could 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 you are experiencing 502 error. It's best to remove all of them 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 default settings, with no 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 causing the problem. Reset your browser settings to default 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 is 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. 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've followed the troubleshooting tips above, now would be the time to reinstall your 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 MS Forefront TMG SP1 installed and receive Error Code: 502 Proxy Error. The network logon failed. (1790) or a similar message when accessing a Web page. This is not a common solution to proxy 502 error messages and only applies in this particular situation. Forefront TMG 2010 is an enterprise 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 could cause error 502, especially if you see the error on more than one website. In such cases, a restart would be helpful.

9. Restart the network equipment. Problems with modems, routers, switches, or other network devices could cause 502 Bad Gateway or other 502 errors. A simple restart of these devices could help.

10. Change your DNS servers, either on your router or on your computer or device. Some Bad Gateway errors are caused by transient problems with DNS servers. If you have not previously changed them, the DNS servers you have configured at this time are probably the ones assigned automatically by your ISP. Fortunately, there are several other DNS servers that you can choose from. Check out our list of free and public DNS servers.

11. Contacting the website directly might also be a good idea. Probably, assuming they are at fault, the website administrators are already working to correct the cause of the 502 Bad Gateway error.

12. Contact your Internet Service Provider. If your browser, computer, and network are all working, and the website reports that the page or site is working correctly, the 502 Bad Gateway problem could be caused by a network problem that your 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 website network. Either way, you're not the only one seeing the 502 error and so you'll have to wait until the problem will not be solved.

add a comment of 502 HTTP Bad Gateway error, what is it and how to fix
Comment sent successfully! We will review it in the next few hours.