502 Bad Gateway


Back


Definition
A 502 Bad Gateway error occurs when a server acting as a gateway or proxy receives an invalid or no response from an upstream server. It is an HTTP status code that typically indicates a temporary issue with the website’s server communication.

Why it matters
502 errors can cause websites to become temporarily unavailable, affecting user experience, search engine indexing, and business operations. They are often caused by server overload, misconfigured firewall rules, or connectivity issues between servers.

Example use case
A user tries to access a website, but the browser shows a 502 Bad Gateway error. This happens because the site’s content delivery network (CDN) could not get a valid response from the origin server due to a timeout or configuration issue.