HTTP 502: Bad Gateway

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

What it means

A gateway or proxy received an invalid response from the upstream server. Server errors mean a valid request failed on the server or a service behind it.

Common causes

Upstream app crashed, wrong proxy target, PHP-FPM or Node process down.

How to fix it

Restart the upstream service, check it is listening, and review proxy configuration.

If you are a visitor

The problem is on the website side. Wait a few minutes and reload. If it persists, check whether the site is down for everyone with the site down checker.

If you own the site

Retrying later often works. If it keeps happening, the site owner must fix the server. Short 5xx outages are usually tolerated, but errors lasting hours can make Google slow its crawling, and days of errors can drop pages from the index. A 503 with a Retry-After header is the right signal for planned downtime. Run the HTTP status checker to see exactly what your URL returns, and use uptime monitoring to be told when it changes.

Frequently asked questions

What does HTTP 502 mean?

Bad Gateway: A gateway or proxy received an invalid response from the upstream server.

Is HTTP 502 an error?

Yes. Server errors mean a valid request failed on the server or a service behind it.

Does HTTP 502 affect SEO?

Short 5xx outages are usually tolerated, but errors lasting hours can make Google slow its crawling, and days of errors can drop pages from the index. A 503 with a Retry-After header is the right signal for planned downtime.

Should I retry after HTTP 502?

Retrying later often works. If it keeps happening, the site owner must fix the server.