502 Bad Gateway

The server acting as a gateway received an invalid response from the upstream server. Common with reverse proxies (nginx, Cloudflare).

Status Code502
NameBad Gateway
CategoryServer Error
MeaningThe server acting as a gateway received an invalid response from the upstream server. Common with reverse proxies (nginx, Cloudflare).

Common Causes

Backend is down — the upstream server (PHP-FPM, Node, etc.) crashed

Timeout — backend took too long to respond

Wrong proxy config — nginx pointing to wrong port

Related Status Codes

All HTTP Status Codes · SSL Test · HTTPS Redirect Tester · All Tools

All Tools · Learn · SamNet