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?
Yes, a server error: the website failed to handle the request. Usually only the site owner or host can fix it.
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
- 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)
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).