502
Bad Gateway
Server Error
Description
The server was acting as a gateway or proxy and received an invalid response from the upstream server
Common Usage
Common with reverse proxies when upstream server is down
Example Response
How this status code appears in HTTP responses
HTTP Response Header
HTTP/1.1 502 Bad GatewaycURL Example
curl -I https://example.com
# Returns: HTTP/1.1 502 Bad GatewayServer Error Response
This is a server error response indicating the server failed to fulfill a valid request.
Related Server Error Codes
Other codes in the same category