TR EN

HTTP 502: 502 Bad Gateway

HTTP 502 Bad Gateway indicates that the server, while acting as a gateway or proxy, received an invalid response from the inbound server.

502

502 Bad Gateway

HTTP RFC Standard

What Does HTTP 502 Mean?

HTTP 502 Bad Gateway indicates that the server, while acting as a gateway or proxy, received an invalid response from the inbound server.

Causes and How to Fix HTTP 502

Crashed backend processes (PHP-FPM, Gunicorn, Node.js), out-of-memory errors, or reverse proxy misconfigurations.

SEO & Search Engine Impact

Complete outage. Must be mitigated immediately by restarting backend daemons.

Web Server Configuration (Nginx & Apache)

Configure custom error handling in your web server:

# Nginx Custom Error Handler
error_page 502 /502.html;
location = /502.html {
    root /var/www/html;
    internal;
}

Frequently Asked Questions

How do I fix an HTTP 502 status code?
Crashed backend processes (PHP-FPM, Gunicorn, Node.js), out-of-memory errors, or reverse proxy misconfigurations. Check server error logs (/var/log/nginx/error.log) and verify application route handlers.
Does HTTP 502 affect my SEO rankings?
Complete outage. Must be mitigated immediately by restarting backend daemons.