WhereGoes

502 Bad Gateway

5xx server error

A gateway or reverse proxy received an invalid or empty response from an upstream server, so it could not complete the client request.

Common causes

  • The upstream process crashed or closed the connection early.
  • The backend returned malformed headers or a truncated body.
  • A DNS or service discovery entry points at the wrong port.

How to fix it

  • Check upstream health and restart the failing process.
  • Verify the proxy target host and port in configuration.
  • Look for upstream timeouts or memory pressure before the crash.

What it means for redirects and SEO

Bad gateway means the origin is unreachable through the proxy, so crawlers see 5xx and retry later. Upstream crashes and bad DNS are common. Check the proxy-to-origin path before the content.

Related codes