HOW TO FIX ERROR CODE

A technician's bench, not a miracle script

HTTP

502 Bad Gateway

Group: HTTP · Card path: /codes/http-502/

What it means

A proxy or load balancer in front of the site received an invalid response from the server behind it. You reached the front door. The front door did not get a usable answer from the service it was asking.

Where you usually see it

Sites that sit behind a reverse proxy, a content delivery network, or a hosting control panel's proxy. It often appears during a restart or a failed deploy.

What to try first

Wait and retry. If you run the site, check that the origin application is running and listening on the port the proxy expects, and that the proxy timeout is long enough for a slow first response after a restart.

When to stop

A 502 is not usually a DNS problem, and it is not fixed by installing another browser. If it lasts, the people who run the origin need the time and the URL, not a screenshot of a generic error page alone.

Back to HTTP codes