HTTP 503 Service Unavailable
HTTP 503 Service Unavailable means the server is temporarily unable to handle the request, because it is overloaded, down for maintenance or rate limiting.
Quick answer
HTTP 503 Service Unavailable means the server is temporarily unable to handle the request, because it is overloaded, down for maintenance or rate limiting. It signals that the problem should pass, and a Retry-After header can tell clients and crawlers when to come back.
Last updated · Maintained by FreeAIToolz · How we test
What does HTTP 503 Service Unavailable mean?
503 is the correct code for planned maintenance: Google treats it as temporary and keeps your pages indexed if the outage is short. Serving a maintenance page with 200 risks having that page indexed instead.
| Status code | 503 |
|---|---|
| Name | Service Unavailable |
| Class | 5xx Server Error |
| Defined in | RFC 9110 §15.6.4 |
| Cacheable by default | No, unless Cache-Control says so |
| Safe to retry automatically? | Yes, with backoff |
| Related headers | Retry-After |
What causes HTTP 503?
- Planned maintenance mode.
- Server overload or exhausted worker pool.
- Autoscaling not keeping up with traffic.
- An upstream dependency failing health checks.
How do I fix HTTP 503?
- Use 503 with Retry-After during maintenance, and keep it short (hours, not days).
- Scale workers or instances; add caching for heavy pages.
- Check health-check configuration on the load balancer.
What should a client do after HTTP 503?
Wait for Retry-After (or back off exponentially) and retry.
Does HTTP 503 affect SEO?
The right code for maintenance. Google tolerates short 503 periods; if 503 lasts more than a few days, URLs may start to be dropped.
Example 503 response
HTTP/1.1 503 Service Unavailable
Date: Mon, 01 Dec 2026 12:00:00 GMT
Retry-After: 3600
Content-Type: application/json
{"error":{"status":503,"message":"Service Unavailable"}} How to return 503 Service Unavailable in code
Express (Node.js)
res.status(503).json({ error: 'Service Unavailable' }); Next.js route handler
return Response.json({ error: 'Service Unavailable' }, { status: 503 }); FastAPI (Python)
raise HTTPException(status_code=503, detail="Service Unavailable") PHP
http_response_code(503); Nginx
location = /example {
return 503;
} Other 5xx status codes
The server failed to fulfil a valid request. Retrying later, with backoff, is usually reasonable.
- 500 Internal Server Error
- 501 Not Implemented
- 502 Bad Gateway
- 504 Gateway Timeout
- 505 HTTP Version Not Supported
- 507 Insufficient Storage
- 508 Loop Detected
- 511 Network Authentication Required
- 520 Web Server Returned an Unknown Error
- 521 Web Server Is Down
- 522 Connection Timed Out
- 523 Origin Is Unreachable
- 524 A Timeout Occurred
- 525 SSL Handshake Failed
- 526 Invalid SSL Certificate
Frequently asked questions
Which status code should I use for maintenance?
503 vs 500?
Is 503 a client or server error?
Related
- 500 Internal Server Error HTTP 500 Internal Server Error is a generic server-side failure: something went wrong in the application or se.
- 502 Bad Gateway HTTP 502 Bad Gateway means a server acting as a gateway or proxy (Nginx, a load balancer, Cloudflare) got an i.
- 504 Gateway Timeout HTTP 504 Gateway Timeout means a gateway or proxy did not get a response from the upstream server in time.
- 429 Too Many Requests HTTP 429 Too Many Requests means the client has sent too many requests in a given time and is being rate limit.
- Open the HTTP Status Codes Reference → Free, no signup.