A 502 bad gateway error is an HTTP status code that signifies a communication error between two web servers. This error occurs when a website receives an invalid response from its host server or faces issues like server overloads, network problems, or configuration errors.
Alternatively, you could put it this way: each time you input the address of a website and press input, your request passes via multiple computers before arriving at the primary computer that hosts the page. Any of these middlemen who have difficulties completing your request will return a HTTP Code 502 bad gateway error to your browser.

