Skip to content

Common error codes in an outage: 500, 502, 503, 504

Reviewed on 16 November 2026

These codes usually point to a problem on the server side. MDN notes an exception for 502 and 504: client networking errors, especially if the service works for other visitors.1 The first-steps page shows how to rule out your own connection. Each of the four points to a slightly different kind of trouble. None is a full diagnosis.

500: something went wrong inside

MDN says a 500 means the server hit an unexpected condition that stopped it filling the request.2 It's a catch-all. The server couldn't find a more specific code to send, so it fell back on the plainest one it had.

The causes MDN lists include improper server configuration, running out of memory, unhandled exceptions and improper file permissions.2 On a small site, that often traces back to a recent change, such as a plugin update or an edited settings file. That's a reason to think about what changed just before the error appeared.

502: a bad reply from behind

Some sites sit behind a middle server, called a gateway or proxy. It takes the visitor's request and passes it to the main server, called the origin or upstream server. Think of a receptionist who phones the back office.

A 502 means the gateway received an invalid response from the upstream server.3 The receptionist got an answer. It made no sense.

Where a gateway error comes fromVisitor asks for a pageGateway or proxy passes it onOrigin server answers badly or lateVisitor sees a 502 or 504
A 502 or 504 means the middle server couldn't get a good answer from the one behind it.

MDN says there are many causes, and fixing them probably needs investigation by server owners or administrators.3 For most small site owners, that means your host.

503: not ready right now

A 503 means the server isn't ready to handle the request.4 MDN names common causes: the server is down for maintenance, or it's overloaded.4 It can also happen automatically during software updates.4

If you've started a planned update yourself, a brief wait isn't a surprise. If you haven't, ask your host.

504: no reply in time

A 504 is a close cousin of 502. The gateway didn't get a response in time from the upstream server.1 The receptionist phoned the back office and nobody picked up.

MDN adds that the site may work again at a later time.1 That doesn't mean you should only wait, though. A monitor that keeps reporting 504 for an hour needs a call to your host.

Quick comparison

Code Plain meaning Often points to
500 The server hit something unexpected Configuration, memory, file permissions, a code error2
502 The gateway got an invalid reply A problem behind the gateway3
503 The server isn't ready Maintenance or overload4
504 The gateway waited and got nothing The server behind it was too slow or silent1

What to do with this

Write down the code and the time it appeared, because your host will ask for both. The first-steps page lists what to pass on.

These codes say where to start looking, though they don't say what's broken. Don't guess.

Notes and sources

  1. 504 Gateway Timeout, MDN Web Docs
  2. 500 Internal Server Error, MDN Web Docs
  3. 502 Bad Gateway, MDN Web Docs
  4. 503 Service Unavailable, MDN Web Docs