502 Bad Gateway
A server acting as a gateway received an invalid response from the upstream server.
What it means
HTTP 502 Bad Gateway means a server acting as a proxy or gateway received an invalid or empty response from the upstream server it was trying to reach. The edge server is fine; the backend it depends on returned something broken.
When it happens
It happens when an origin server is down or crashing behind a CDN or load balancer, when an upstream times out, or when a reverse proxy cannot get a valid response from the application server.
How to fix it
- Check that the origin or upstream application server is running and healthy.
- Review reverse proxy or load balancer configuration and upstream addresses.
- Inspect upstream logs for crashes or timeouts.
- Restart the application server if it has hung.
SEO impact
Damaging if sustained. Like other 5xx errors, 502 prevents indexing and signals unreliability to crawlers. Resolve quickly to avoid crawl-rate reductions and ranking loss.
Find out which of your URLs return 502
Paste a list of URLs and Sitewell checks the status code of every one at once — free and without signup.
Related codes
A gateway server did not receive a timely response from the upstream server.
503 Service UnavailableThe server is temporarily unable to handle the request, often due to overload or maintenance.
500 Internal Server ErrorA generic error meaning the server encountered an unexpected condition.
501 Not ImplementedThe server does not support the functionality required to fulfil the request.
505 HTTP Version Not SupportedThe server does not support the HTTP protocol version used in the request.
506 Variant Also NegotiatesA server misconfiguration in content negotiation causes an internal negotiation loop.
Related guides
A plain-English primer on HTTP status codes for SEOs: what the 2xx, 3xx, 4xx, and 5xx families mean, which ones affect rankings, and the codes worth knowing.
How to find and fix broken linksA practical walkthrough for finding broken links on your site, working out why each one breaks, and fixing them so visitors and crawlers stop hitting dead ends.