An HTTP 503 error means the server is temporarily unable to handle a request. To fix it, identify which layer returned the response, connect it to deployment or capacity evidence, repair that cause, and verify the public route again. A successful build does not establish that the deployed application can serve visitors.
This guide is for developers and students who control the failing website. If you are only visiting someone else's site, wait before retrying and contact its support team if the problem persists. You cannot repair its server from your browser.
HTTP 503 error troubleshooting checklist
Before changing configuration, collect a small incident record:
- Record the failing URL, UTC time, request method, status, and release identifier.
- Capture the response headers and body, including any request ID and Retry-After value.
- Determine whether the main HTML document, a required API, or an optional resource failed.
- Compare the public response with authorized application, proxy, and hosting logs.
- Check maintenance flags, deployment health, dependency availability, and capacity limits.
- Repair or roll back the identified cause, then repeat the same public request.
- Complete the visitor's task and keep a focused recovery check in CI.
Avoid repeatedly refreshing a struggling site while investigating. Use a few timestamped requests and existing telemetry. Load testing belongs in a planned environment with explicit capacity limits.
If requests are rejected because a client exceeded a quota, use the HTTP 429 rate-limit troubleshooting guide to identify the bucket and verify recovery.
What 503 Service Unavailable tells you
MDN's 503 reference describes a temporary inability to serve a request, commonly during maintenance or overload. The response identifies the outcome; it does not identify the broken component. An application, reverse proxy, load balancer, or hosting edge may produce it.
A branded error page is a clue, but request correlation is stronger evidence. A proxy may relay an application's response or replace its body. Likewise, a Server header alone does not prove that layer caused the failure.
Separate these three launch failures:
- The document returns 503: visitors cannot reach the intended page reliably. Start with response delivery and backend readiness.
- The document returns 200, but a required API returns 503: the shell loads while the task fails. Investigate that API and show a usable failure state.
- An optional dependency returns 503: confirm whether the page remains usable before deciding whether it blocks release.
In DevTools, open Network, reload once, and inspect the document and the request used by the failing action. Follow the JavaScript console error triage guide when the page loads but its content or controls fail afterward.
Capture the failing public response with curl
Use a GET request against a public URL you own. Save headers and body separately so a helpful-looking maintenance page cannot hide its status:
curl --silent --show-error --location --max-redirs 5 \
--connect-timeout 10 --max-time 30 \
--dump-header /tmp/launch-response-headers.txt \
--output /tmp/launch-response-body.html \
--write-out 'status=%{http_code} final=%{url_effective} seconds=%{time_total}\n' \
https://example.com/
The saved headers include responses along the redirect chain. Inspect the final response and final URL together. A redirect to a maintenance route can otherwise make you investigate the wrong handler. The curl manual documents these options and the write-out values.
This diagnostic command deliberately keeps HTTP error bodies. A completed transfer can exit successfully even when its HTTP status is 503; check the printed status. DNS, TLS, and connection failures are different evidence and may produce no HTTP response at all.
Keep any request identifier with the timestamp when consulting hosting logs or support. Review saved output before sharing it: URLs, headers, and error bodies can contain information that does not belong in a public ticket.
Compare the exact URL in a clean browser session. If results differ, inspect redirects, cookies, service workers, and the request's path through your CDN. One successful request from a laptop does not disprove a failure observed by another client or location.
Find the cause before increasing limits
Start with the change closest to the first failure. If availability changed immediately after a deployment, compare the previous and current release's startup command, port binding, environment configuration, dependency connectivity, and health-check path. A healthy static homepage can coexist with an unavailable application route.
Use evidence to choose the repair:
- No healthy application instances: inspect startup logs and health-check results. Correct the failing configuration or restore a known working release.
- Maintenance mode remains enabled: find the flag or rule that owns it. Confirm maintenance has finished before removing it.
- Workers or connections are exhausted: correlate the failure window with request queues, active connections, memory, and dependency latency. Reduce the bottleneck before raising concurrency.
- A required dependency is unavailable: check its status and your connection errors. Preserve a clear user-facing failure state while restoring service.
- The edge returns an error absent from application logs: use edge logs and request IDs to locate the failure. Missing application logs are a clue, not proof that the application is healthy.
For Cloudflare-hosted sites, its 503 troubleshooting documentation gives provider-specific distinctions between origin and Cloudflare-generated responses. Use the equivalent documentation for your actual host rather than applying an unrelated server configuration.
Record one hypothesis, the evidence supporting it, and the result of each change. Raising timeouts, restarting everything, or disabling protections together makes it difficult to know what restored service. Retest the original path after a targeted fix; keep the rollback available until recovery is confirmed.
Return 503 and Retry-After during short maintenance
When a valid page is temporarily unavailable, preserve that meaning in the response. A minimal short-maintenance contract might be:
HTTP/1.1 503 Service Unavailable
Content-Type: text/html; charset=utf-8
Retry-After: 300
Cache-Control: no-store
<!doctype html>
<html lang="en">
<title>Temporarily unavailable</title>
<h1>We are updating this service</h1>
<p>Please try again in about five minutes.</p>
</html>
Implement this at the application or hosting layer that owns maintenance. The 300 is an example five-minute estimate, not a universal retry interval. According to the Retry-After reference, the header accepts a delay in seconds or an HTTP date. It communicates when to try again; it does not make browsers automatically reload or guarantee recovery by that time.
Use a useful explanation without exposing infrastructure details. Keep a separate status or support destination available if you have one. Check how the CDN handles the response: the example requests no storage, but an overriding cache rule still needs review. The Cache-Control header guide covers stale responses and cache-policy verification.
Do not turn the unavailable page into 200 OK just to make an availability check pass. After maintenance, restore the real content and its normal successful status, remove the maintenance rule, and check for a stale error response at the public URL.
Understand the crawl impact of repeated 503 responses
Google's crawl-rate guidance describes temporary 503 or 429 responses as signals to slow crawling. It also warns that URLs returning these statuses for multiple days may leave the search index. A 503 is therefore a short-term response to an actual availability condition, not a way to preserve search visibility indefinitely.
Keep the outage start, recovery time, affected routes, and response evidence. After recovery, review server-error reports in Search Console and verify important pages again. A restored HTTP response is evidence of recovery at that time; it is not a guarantee about when search reports or indexing will update.
Add an HTTP 503 error recovery check to CI
In a project already using Playwright Test, adapt this contract to the public routes you control. Each route must serve HTML and the expected page heading after recovery:
import { test, expect } from "@playwright/test";
const routes = [
{ path: "/", heading: "Project Atlas" },
{ path: "/docs", heading: "Documentation" },
];
for (const route of routes) {
test(`public route recovered: ${route.path}`, async ({ page }) => {
const response = await page.goto(
new URL(route.path, "https://example.com").href,
);
expect(response, "navigation must return an HTTP response").not.toBeNull();
expect(response!.status()).toBe(200);
expect(response!.headers()["content-type"]).toMatch(/text\/html/i);
await expect(page.getByRole("heading", {
level: 1, name: route.heading, exact: true,
})).toBeVisible();
});
}
The status assertion catches a maintenance page even if its HTML looks complete. The heading assertion catches an unrelated fallback page that returns 200. Add your primary task separately: these navigation checks do not prove an API, checkout, or form submission recovered.
Playwright's request lifecycle documentation explains that HTTP errors such as 503 do not trigger requestfailed; the server still returned an HTTP response. Assert the status of required requests rather than relying only on network-failure listeners. Keep the test, deployment identifier, and manual task result in your website regression testing record. Passing once does not establish uptime or capacity under load.
Verify the recovered public page with Slop Audit
Once you have repaired the cause, run Slop Audit on the recovered public URL. Its static audit records the final HTTP status and content type and flags an unsuccessful page response. Review that evidence alongside metadata and crawl controls before completing your website launch checklist.
Slop Audit does not inspect server logs, identify the root cause of a 503, validate Retry-After semantics, or load-test your infrastructure. Browser coverage can also be unavailable; review the report's coverage ledger before interpreting downstream checks. Use the public response evidence with your hosting telemetry and task tests, then rerun the same URL after the next deployment.