HTTP
HTTP 503Service Unavailable
HTTP 503 Service Unavailable means the server is up but cannot handle the request right now, because of planned maintenance, overload, or a backend pool with no healthy members. It is meant to be temporary; a Retry-After header tells clients and crawlers when to come back.
What 503 means
The server is reachable and functioning as a server, but the service behind it is not available at this moment. Unlike 500, nothing unexpected happened; the server is explicitly declining. Unlike 502, the proxy is not reporting a broken upstream response, though load balancers do return 503 when every backend fails its health check.
Causes
| Cause | Notes |
|---|---|
| Planned maintenance | Best practice is 503 + Retry-After |
| Overload: worker pool exhausted, queue full | Often intermittent under traffic spikes |
| No healthy backend behind a load balancer | Health checks failing |
| IIS application pool stopped | Rapid-fail protection after crashes |
| Rate limiting or DDoS mitigation | Some products use 503 instead of 429 |
| Startup: application still initialising | Kubernetes readiness probes exist for this |
| Cloud provider capacity or quota limits | Provider status page |
Diagnosis for operators
- Check whether maintenance mode was left on (a common cause after a deploy).
- Look at load balancer health-check status; find out why backends fail the check.
- Check worker utilisation: PHP-FPM status page, Node cluster, thread pool metrics.
- IIS: Event Viewer → System, source WAS, for application-pool failures; then the application's own log for the crash.
- Read
Retry-Afterif a CDN or upstream provider set it; the value may be an epoch or HTTP date.
Doing maintenance properly
HTTP/1.1 503 Service Unavailable
Retry-After: 1800
Content-Type: text/htmlKeep the health-check endpoint returning 200 if your monitoring should not page during planned work, or accept the alert and document the window.
Frequently asked questions
Is 503 bad for SEO?
Not if short. Google treats 503 as a temporary condition, backs off and retries. A 503 that persists for days leads to pages being dropped. Use 503 with Retry-After for maintenance rather than a 200 "we'll be back" page.
How do I put my site in maintenance mode correctly?
Serve a static page with status 503 and Retry-After: 3600 (or a date) for every URL except the health check your monitoring uses. Apache: RewriteRule ^ /maintenance.html [R=503,L] with ErrorDocument 503 /maintenance.html. nginx: return 503; with error_page 503 /maintenance.html;.
Why does IIS return 503 "Service Unavailable"?
The application pool is stopped, usually after repeated crashes triggered rapid-fail protection. Check the System event log for the reason, fix it, and start the pool.