What is Error 502 Bad Gateway?
When we visit a website, the browser will automatically send your request to the website server. The web server receives and processes your request, then sends back the source you requested through the browser along with the HTTP header and HTTP status code.
Usually this HTTP status code is not visible unless our website has an error. This code serves to tell you that something is wrong and will usually show you how to diagnose the error.
There are many types of error codes that begin with the number "5" including codes 500, 501, 502, 504, 520 and others. All of these codes have different meanings. It generally means that the request was accepted, but the server prevented the acceptance. In this article we will discuss error 502 Bad Gateway.
If you get this error code 502 bad gateway, then it means that the initial server is sending an invalid response to another server, which this server serves as a gateway.
Because requests on the web are forwarded through various other gateways. Then, how to solve this error? Take a look below at some ways to resolve error 502 bad gateway.
How to resolve Error 502 Bad Gateway
1. Reload Page
One of the easiest and first ways you should try when facing an error like this is to wait a minute or so, then reload the page by pressing F5 or Ctrl + F5.
Why? Because sometimes errors like this occur because the host or server is overloaded and the site will usually recover. While waiting, you can try again using another browser.