lookup> 502

502 ·Bad Gateway

A gateway or proxy received an invalid response from the upstream server.

Server ErrorRFC7231#6.6.3
Status502
PhraseBad Gateway
TypeServer Error
SpecificationRFC7231#6.6.3

What does HTTP 502 mean?

A gateway or proxy received an invalid response from the upstream server.

It belongs to the 5xx Server Error class of responses, defined in RFC7231#6.6.3.

Browse all codes in this class: 5xx Server Error

How to fix HTTP 502

Check the upstream service's health, timeouts and error logs, then retry.

  • Upstream service returned an invalid response
  • Gateway timeout from a misbehaving proxy

Website visitors

Double-check the URL, return to the homepage and search again, or retry later.

Developers

Check the upstream service's health, timeouts and error logs, then retry.

Server administrators

Check service logs and health, confirm upstream dependencies, restart or scale if needed, then verify monitoring alerts.

Is HTTP 502 cacheable?

502 belongs to the 5xx Server Error class and is generally not cached for long; behavior is controlled by Cache-Control.

What does the 5xx class mean?

5xx Server Error: A gateway or proxy received an invalid response from the upstream server.

5xx responses

Related status codes