EN
5025xx Server errors

HTTP 502 Bad Gateway

A gateway or proxy server received an invalid response from the server behind it.

Quick answer

HTTP status code 502 (Bad Gateway) means: A gateway or proxy server received an invalid response from the server behind it. Yes, a server error: the website failed to handle the request. Usually only the site owner or host can fix it.

Is it an error?

5xx Server errors

Yes, a server error: the website failed to handle the request. Usually only the site owner or host can fix it.

The server failed to handle a valid request; the problem is on the website's side.

Common causes

  • Backend server crashed or sent an invalid response
  • Server overloaded, out of resources or under maintenance
  • Firewall or security plugin blocking the proxy/CDN's IP addresses
  • Server misconfiguration (.htaccess, server or proxy rules)

If you are visiting the site

  1. Reload the page
  2. Wait a few minutes before trying again
  3. Clear the browser's cache and cookies for this site

If you run the website

  1. Make sure the backend (e.g. PHP-FPM or app server) is running and responding
  2. Check the server error logs at the time of the error
  3. Add server resources or caching and check for traffic spikes
  4. Review recent configuration changes (.htaccess, nginx/Apache rules)

Frequently asked questions

What does HTTP 502 mean?

HTTP status code 502 (Bad Gateway) means: A gateway or proxy server received an invalid response from the server behind it.

Is HTTP 502 an error?

Yes, a server error: the website failed to handle the request. Usually only the site owner or host can fix it.

How do I fix a 502 error?

If you are visiting the site: Reload the page; Wait a few minutes before trying again; Clear the browser's cache and cookies for this site. If you run the website: Make sure the backend (e.g. PHP-FPM or app server) is running and responding; Check the server error logs at the time of the error; Add server resources or caching and check for traffic spikes; Review recent configuration changes (.htaccess, nginx/Apache rules).

5xx Server errors