5xx server errors
HTTP 5xx status codes indicate that a server failed to complete an apparently valid request. The server may be temporarily unavailable, may have encountered an internal error, or may be unable to get a response from another server it depends on. The exact meaning depends on the individual code.
What do common 5xx codes mean?
500 Internal Server Errormeans the server encountered an unexpected condition that prevented it from fulfilling the request.502 Bad Gatewaymeans a server acting as an intermediary (a gateway or proxy) received an invalid response from another server it contacted.503 Service Unavailablemeans the server is temporarily unable to handle the request, for example because of overload or maintenance.504 Gateway Timeoutmeans an intermediary server (a gateway or proxy) did not receive a response in time from another server it contacted.
For example, if Alex sees 503 while opening a shop, the response says the service cannot handle the request at that moment. The site may be under maintenance or experiencing heavy load. Alex can try again later, while the site operator can investigate the server and its dependencies. If Alex instead sees a 404, the server answered that the particular resource was not found; that points to a different kind of issue.
Does a 5xx error always mean the hosting server is broken?
No. A response can come from the site's server, a proxy, a gateway, or another service in the request path. A 502 or 504 often involves a server trying to contact another server. The code tells the client which broad kind of failure occurred, but the operator may need logs and monitoring to identify the cause.
Related terms
- HTTP status code — explains the status code classes
- 404 Not Found — a client-error response for a missing or undisclosed resource
- Hosting provider — may operate the servers and network systems involved in a site response