WebmasterID logoWebmasterID
Crawl diagnostics

HTTP 502 Bad Gateway

502 Bad Gateway means a server acting as a gateway or proxy received an invalid response from an upstream server it was trying to reach. It points at a problem between layers — origin down, app crash, or a misconfigured proxy — rather than at the requested resource itself.

Verified against primary sources

What 502 means

502 Bad Gateway is returned by a server acting as a gateway or proxy when it receives an invalid response from the upstream server it contacted to fulfil the request. The edge is up, but what is behind it failed to answer properly.

Common causes are an origin that is down or crashing, an application that returned a malformed response, or a proxy misconfiguration.

Transient vs persistent 502s

A short burst of 502s during a deploy or restart is usually transient — crawlers retry and recover. The concern is persistent 502s: they indicate a real break between your edge and origin, and like sustained 500s they cause crawlers to slow down and can risk pages being treated as unavailable.

Diagnosis means looking below the edge: is the origin healthy, is the app responding, are timeouts or bad upstream addresses involved?

Operator checklist

When crawlers see 502s, check origin health and application logs, not just the edge. Verify upstream addresses, timeouts, and proxy configuration. For planned restarts, prefer returning 503 with Retry-After at the edge over letting requests fail with 502.

How it appears in analytics and logs

A 502 means a proxy or gateway could not get a valid response from upstream. For crawlers it is a failed fetch; transient 502s are tolerated, but persistent 502s indicate an origin or proxy problem that can degrade crawl health like sustained 500s.

Diagnostic use case

Diagnose 502s a crawler receives, and tell a transient blip from a persistent upstream fault that needs fixing before it affects crawling.

What WebmasterID can help detect

WebmasterID can surface 502s crawlers receive and the affected paths, helping you tell a brief upstream blip from a persistent gateway fault.

Common mistakes

Privacy and accuracy notes

Status codes carry no personal data. WebmasterID reports 502 patterns for crawler traffic without exposing individual visitors.

Related pages

Sources and verification notes

Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.