HTTP 502


Back


Definition
HTTP 502, also known as a “502 Bad Gateway” error, is a server-side status code that indicates one server acting as a gateway or proxy received an invalid response from an upstream server. This often occurs when a server is overloaded, down, or misconfigured.

Why it matters
A 502 error can disrupt access to websites or applications, leading to poor user experience and potential loss of trust or revenue. It often signals issues in the server infrastructure or communication between services, making it important for developers and IT teams to diagnose and resolve it quickly.

Example use case
A user tries to visit a website, but instead of loading, the browser shows a “502 Bad Gateway” error. The website uses a load balancer to distribute traffic to backend servers, and one of those servers is unresponsive, causing the error to be displayed to users.