What is Error 502 Bad Gateway?

David Russel
2 min readFeb 12, 2020

--

As you know, to view a website, your browser has to send several requests to different servers, which then send you the content you are requesting. If something goes wrong during this process, the server sends an HTTP status code to the browser so that you can know that something has failed and, depending on the error, give you a rough idea of ​​what it is.

Error 502, along with status code Error 404, is one of the most common that you will find on the network. Likely, you have already found it on famous websites such as Twitter or Reddit. Not even the big ones get rid! Next, I explain to you what exactly error 502 consists of, what its causes are and how you can solve it quickly if it is your website that is affected.

Error 502 or Bad Gateway Error, like all HTTP status codes that start with the number 5, occurs because there is an error caused by an element outside your computer or browser, not necessarily caused by the final server. It is also the case of error 504, which we have also discussed in the blog.

Therefore, error 502 has nothing to do with your settings, with the device you use, with your operating system, with your Internet connection or with your browser: it has to do with a server that is receiving an invalid response from another.

The error 502 screens may vary slightly depending on the server in question. It may appear with expressions similar to “Error 502”, “502 Bad Gateway”, “502 Incorrect Gateway”, “502. That’s an error ”, etc.

--

--

David Russel

I am a blogger and loves to write, I am also a writer at many prominent sites