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.

BlackhawkHub Editorial · Updated

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

CauseNotes
Planned maintenanceBest practice is 503 + Retry-After
Overload: worker pool exhausted, queue fullOften intermittent under traffic spikes
No healthy backend behind a load balancerHealth checks failing
IIS application pool stoppedRapid-fail protection after crashes
Rate limiting or DDoS mitigationSome products use 503 instead of 429
Startup: application still initialisingKubernetes readiness probes exist for this
Cloud provider capacity or quota limitsProvider status page

Diagnosis for operators

  1. Check whether maintenance mode was left on (a common cause after a deploy).
  2. Look at load balancer health-check status; find out why backends fail the check.
  3. Check worker utilisation: PHP-FPM status page, Node cluster, thread pool metrics.
  4. IIS: Event Viewer → System, source WAS, for application-pool failures; then the application's own log for the crash.
  5. Read Retry-After if a CDN or upstream provider set it; the value may be an epoch or HTTP date.

Doing maintenance properly

http
HTTP/1.1 503 Service Unavailable
Retry-After: 1800
Content-Type: text/html

Keep 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.

Sources