HTTP Status Codes / 5xx HTTP Status Codes / HTTP 503

503 Service Unavailable

This is an educational reference page about HTTP 503 Service Unavailable. The page itself is served as 200 OK so it can be indexed as HTTP documentation.

The server is currently unable to handle the request because of a temporary overload or scheduled maintenance.

Specification

Registered in the IANA HTTP Status Code Registry as Service Unavailable. Defined in RFC 9110, Section 15.6.4.

What it means

HTTP 503 Service Unavailable means the server cannot handle the request right now because it is overloaded or down for maintenance. The condition should pass after a delay. The server MAY send Retry-After to say when to try again. RFC 9110 notes that a server does not have to use 503 when overloaded; some refuse the connection instead.

When to use it

Common causes

Headers involved

How to fix it

Examples

Planned maintenance

GET /api/orders HTTP/1.1
Host: api.example.com

HTTP/1.1 503 Service Unavailable
Retry-After: 600
Cache-Control: no-store
Content-Type: application/problem+json

{
  "type": "https://api.example.com/problems/maintenance",
  "title": "Scheduled maintenance",
  "status": 503,
  "detail": "Back by 02:30 UTC."
}

Common mistakes

Developer notes

503 with Retry-After is the right response for a short maintenance window. For search engines, it says "come back later" instead of "this page changed".

Questions

What does HTTP 503 Service Unavailable mean?

HTTP 503 means the server is temporarily unable to handle the request because of overload or maintenance.

Should a maintenance page return 503?

Yes. Return 503 with Retry-After so clients and search engines know the outage is temporary.

What is the difference between 503 and 429?

503 means the service is unavailable to everyone. 429 means one client exceeded its rate limit.

See also

Header and content rules

What RFC 9110 says about a 503 response, quoted from the RFC. The 5xx class rules also apply.

The same rule is in the response obligations table and its JSON.

Related comparisons

5xx server error – the server failed to fulfill an apparently valid request


HTTP status code lookup
REST API status code chooser
cURL command generator
By Ping Now, a website/API/service uptime monitor
Data from Wikipedia