devkult_
tools29converters34

503 Service Unavailable

5xx server error

The server is temporarily unable to handle requests — overloaded or down for maintenance.

503 is the server saying 'not right now'. It's meant to be temporary: maintenance windows, deploys, overload, an exhausted dependency. Send Retry-After so clients and crawlers know when to come back.

Search engines treat a short 503 as a pause and keep your rankings, which makes it the right status for planned maintenance.

Class5xx Server Error
Retry?With backoff (idempotent requests only)
Cacheable by defaultNo — only with explicit Cache-Control
Response bodyAllowed
Defined inRFC 9110 §15.6.4 — 503 Service Unavailable
Example response
HTTP/1.1 503 Service Unavailable
Retry-After: 120
Content-Type: application/json
Content-Length: 31

{"error":"Service Unavailable"}

Common causes

  • Planned maintenance or a deploy in progress.
  • Traffic spikes beyond capacity: connection pools or worker queues are full.
  • No healthy backends behind a load balancer.
  • Scale-to-zero platforms starting cold instances.

How to fix it

  1. During maintenance, return 503 with Retry-After rather than a 200 'we'll be back' page.
  2. Add capacity, or shed load gracefully with queues and 429s.
  3. Check the load balancer's health checks — one failing check can take every target out of service.
  4. Clients: retry with backoff, respecting Retry-After.

Useful here: Retries, backoff and Retry-After · 502 vs 503 vs 504

Send a 503 from your server

Express
res.set("Retry-After", "120");
res.status(503).json({ error: "Service Unavailable" });
Next.js route handler
return Response.json({ error: "Service Unavailable" }, { status: 503, headers: { "Retry-After": "120" } });
Flask
return {"error": "Service Unavailable"}, 503, {"Retry-After": "120"}
Go net/http
w.Header().Set("Retry-After", "120")
http.Error(w, "Service Unavailable", http.StatusServiceUnavailable)
nginx
add_header Retry-After "120" always;
return 503;

Check what a URL returns

Print just the status line from the command line, or check a whole list of URLs at once, with their response headers, in the HTTP Status Checker.

curl -sI https://example.com/your-path | head -n 1

Frequently asked questions

Will a 503 hurt my SEO?

Not for a short period. Google treats 503 as temporary and comes back later. If a site returns 503 for days, pages can start dropping out of the index.

503 vs 500?

500: something broke unexpectedly. 503: the server knows it can't serve right now, and expects that to pass.

Headers used with 503
Related status codes