What Does HTTP 503 Service Unavailable Mean?
HTTP 503 indicates that the server is temporarily unable to handle the request. Unlike 500 (something broke unexpectedly), 503 is often an intentional response — the server knows it cannot process requests right now and is telling you to come back later.
The 503 response should include a Retry-After header with either a number of seconds or a specific date/time when the client should try again. This helps clients implement polite retry logic instead of hammering the server during its recovery.
503 is the correct status code for planned maintenance, overload protection (shedding load to prevent a complete crash), and deployment windows. It is also what search engines want to see during maintenance — it tells crawlers that the downtime is temporary and they should not remove the page from their index.
Common Causes
- Planned maintenance: The server is intentionally offline for updates, database migrations, or infrastructure changes. A proper maintenance page returns 503 with a Retry-After header, not a 200 with a "we'll be back" page.
- Server overload: Too many concurrent requests have exhausted the server's resources (CPU maxed, memory full, all worker threads busy). The server starts rejecting new requests with 503 to protect existing connections.
- Application restart during deployment: During zero-downtime deployments, the old process is being replaced by the new one. If the transition is not seamless (e.g., no rolling restart), there is a brief window where requests get 503.
- Database or dependency unavailable: The application is running but cannot complete any request because a critical dependency (database, cache, external API) is down. The application returns 503 to signal temporary unavailability.
- Auto-scaling lag: A traffic spike hits before auto-scaling can provision new instances. The existing servers are overwhelmed and return 503 until new capacity comes online.
How to Implement and Fix 503
Nginx Maintenance Mode
Express.js Circuit Breaker
Kubernetes Readiness Probes
Load Shedding Implementation
503 and SEO
503 is the correct HTTP status for temporary downtime. Here is why it matters for SEO:
- Google will retry: When Googlebot encounters a 503, it understands the page is temporarily unavailable and will try again later. It does not remove the page from the index.
- Do not return 200 for maintenance: Showing a maintenance page with a 200 status can cause Google to index the maintenance page content instead of the actual page content.
- Include Retry-After: Googlebot respects the Retry-After header and will wait the specified time before retrying.
- Keep downtime short: Extended 503 periods (days) may eventually cause Google to temporarily drop pages from the index. Keep planned maintenance under a few hours.
Frequently Asked Questions
Retry-After header in the response — it tells you when the server expects to be back. If there is no Retry-After header, try again in 30-60 seconds.