A 502 Bad Gateway error occurs when a server acting as a gateway or proxy receives an invalid response from an upstream server. It typically indicates infrastructure problems between connected servers.
The 502 status code means an intermediary server (such as a load balancer, reverse proxy, or CDN edge node) received a response from an upstream server that was invalid, incomplete, or could not be understood. The upstream server may have crashed, returned malformed data, or closed the connection unexpectedly.
Like other 5xx errors, persistent 502 responses prevent search engines from indexing affected pages and can reduce overall crawl rate. Because 502 errors often affect entire sections of a site simultaneously, they can cause widespread ranking drops if not resolved quickly.
A 502 error occurs in multi-server architectures when the frontend server cannot get a valid response from the backend. Common causes include backend server crashes, PHP-FPM timeouts, overloaded application servers, or misconfigured proxy settings.
Want to learn more? Explore our SEO Glossary or check out our expert guides on SEO strategies.