On this page
A planned outage raises a practical question: should visitors see a maintenance page, or should their browsers be sent somewhere else? For 503 versus redirect for website maintenance, the key distinction is whether the requested resource is temporarily unavailable or has actually moved.
This guide explains how to choose a response, use Retry-After carefully, and check the site before and after a maintenance window. RFC 9110 is the relevant HTTP protocol reference; its text was not available for review in this run, so consult it when implementing protocol-sensitive behavior. The commands below were not executed here.
Key Takeaways
- Return 503 Service Unavailable when a resource is temporarily unable to serve its normal response, including during planned maintenance.
- Use a redirect when there is a genuine alternate destination, not simply to conceal an outage.
- A maintenance page should accompany the 503 response for the requested URL; returning a 200 page that merely says “down for maintenance” does not communicate the outage through the status code.
Retry-Aftersuggests when a client may retry. It is not a guarantee that service will be restored at that time.- Test representative URLs, visitor flows, and the return to normal service—not just one status code.
Choose the response that matches the situation
| Situation | Response | Why |
|---|---|---|
| The requested page is temporarily unavailable during maintenance | 503 | It communicates temporary service unavailability while allowing you to display a maintenance message. |
| The requested content has a real temporary destination | 302 or 307 redirect, as appropriate | A redirect tells the client to request a different URL. A 307 preserves the request method. |
| The content has permanently moved | 301 or 308 redirect, as appropriate | These communicate a permanent move. A 308 preserves the request method. |
| The resource no longer exists and no replacement is intended | 404, or 410 when its permanent removal is known | These describe missing or removed resources, not a planned temporary outage. |
| The server encounters an unexpected failure | 500 | This is a general server error; use 503 when the problem is known to be temporary unavailability. |
Redirect behavior matters for forms and APIs. Do not assume that every redirect preserves a POST request's method and body: choose a status deliberately and test the actual clients involved. Redirecting an API request to an HTML maintenance page can also break clients expecting JSON.
A redirect can be appropriate during maintenance if it leads to a useful alternate service—for example, a separate status site. But a redirect to a page that ultimately returns 200 describes a successful request at the destination, not a 503 response for the original URL. A browser-based redirect performed by JavaScript has the same limitation if the original HTTP response was 200.
Advertisement
Example: a seasonal release window
Suppose a retailer needs to pause its storefront while deploying a seasonal catalog. Product pages, search, and checkout cannot safely serve their normal responses during the change.
For each affected request, configure the server or edge layer to return 503 with a short maintenance page. The page can explain that the storefront is temporarily unavailable, provide a support contact, and link to a separate status page if one exists. Avoid promising a completion time unless the operator can support it.
An unaffected help center can remain available with its normal response. Serve any CSS or images needed by the maintenance page reliably, or keep the page self-contained. If checkout submissions or API requests are affected, decide how those endpoints should respond too; an HTML page may not be useful to an API client.
This approach works year-round: the important question is whether each requested resource is temporarily unavailable, not whether the outage is seasonal.
Use Retry-After as guidance, not a restoration promise
A 503 response can include a Retry-After header. Its value can be a delay in seconds or an HTTP date. For example, Retry-After: 3600 suggests a client retry after an hour; it does not assert that the site will be restored exactly then. Clients may also ignore the guidance, so the header is not a substitute for capacity planning or a clear visitor message.
Choose a conservative retry interval that reflects your operating plan. If the end of maintenance is uncertain, do not present an estimated retry time as a guaranteed reopening time. Update the response if the plan changes, and remove maintenance-specific headers when normal service resumes.
Also plan caching deliberately. A cached 503 may continue to reach visitors after the application is healthy. Check the behavior of your CDN, reverse proxy, and application, including their error-cache settings; consider a Cache-Control: no-store policy for the maintenance response where appropriate. Verify the actual behavior in your environment rather than assuming every intermediary will treat the response identically.
Advertisement
Test the maintenance window and restoration
Before the window, prepare a list of representative URLs and access paths: the homepage, important landing and product pages, search, sign-in, checkout, APIs, and any alternate hostname or CDN path. Include URLs that should remain available. Test only systems you own or are authorized to operate.
- Before activation: Record the normal behavior of representative pages and a safe API request. Confirm who can enable and disable maintenance mode, and how to bypass it for authorized checks if needed.
- During maintenance: Check that affected URLs return 503 directly, show the intended message, and include the intended
Retry-Afterand cache headers. Check that unaffected services still work. Test redirects separately and inspect theirLocationheaders. - As a visitor: Open the site in a browser and check readability, mobile layout, accessibility, links, and required assets. Test relevant API clients and form flows without submitting real transactions. A status check alone cannot assess the full visitor experience.
- After restoration: Disable maintenance mode, clear or invalidate cached maintenance responses where necessary, and repeat the checks through the public hostname. Confirm normal status codes, content, headers, and critical journeys. Check more than one affected URL and verify that
Retry-Afteris no longer being sent unintentionally.
For a basic header inspection, replace the example URL with an authorized URL. -i includes response headers; without -L, curl will not follow a redirect, so you can inspect the initial response.
curl -i -sS https://example.com/important-page
To inspect a redirect chain separately, add -L. Review each response rather than assuming the final page's status describes the original request:
curl -i -sS -L https://example.com/important-page
These commands make GET requests. Test other methods and authenticated journeys with suitable non-production or otherwise safe data; do not place credentials in commands that might be recorded in shell history or logs.
Common Mistakes
- Returning 200 for an unavailable page. The message may be understandable to a person, but the HTTP status signals success to clients.
- Redirecting every URL to one maintenance page. This can obscure which resources are unavailable and disrupt forms or API clients.
- Using 404 or 410 for a temporary outage. Those statuses describe missing or removed resources, not a planned service interruption.
- Treating
Retry-Afteras an automatic recovery mechanism. It does not force clients to wait or bring the service back online. - Checking only the homepage. Other routes, hosts, cached responses, and application components may behave differently.
Best Practices
Keep the maintenance page brief and usable without relying on the application being maintained. Give visitors a truthful explanation and a support or status contact when available. Coordinate application, proxy, and CDN settings, and rehearse both activation and rollback before the window.
For sensitive routes, preserve appropriate access controls and avoid exposing internal diagnostics in the public maintenance message. Monitor the service during restoration so that an apparent return to normal is not just a cached or partial success.
Conclusion
Use 503 when a requested resource is temporarily unavailable; use a redirect when there is a meaningful destination to send the client to. Pair the status with a useful message, cautious retry guidance, and checks that cover both the outage and the return to normal service.
What would your domain sell for?
A free TidyURLs account unlocks the Domain Estimator. It prices a name from 191,011 real domain sales.