Back to Glossary
SEO

503 Service Unavailable

A 503 Service Unavailable error is an HTTP status code signaling that the server is temporarily unable to handle a request, usually because it is overloaded or undergoing maintenance. For SEO, returning a 503 together with a Retry-After header during site maintenance is the recommended way to tell crawlers that the downtime is only temporary.

  • A 503 is a status code meaning the server is temporarily unable to handle a request, typically during overload or maintenance.
  • During site maintenance, return a 503 rather than a 404 or 200 so search crawlers understand the downtime is temporary.
  • Pairing a Retry-After header communicates the expected recovery time, letting Googlebot adjust when it recrawls.
  • If a 503 persists for more than a few days, Google may treat the site as permanently down and drop the affected URLs from its index.
  • Because a 503 is a temporary response, avoid caching it, and serve users a friendly page that explains the situation.

Overview

A 503 Service Unavailable error is a server error response status code indicating that the server is not ready to handle the request. According to the MDN documentation, the most common causes are a server that is down for maintenance or one that is overloaded. During maintenance, administrators may temporarily route all traffic to a 503 page; under load, when resource limits such as memory, CPU, or connection pools are reached, some server applications reject requests with a 503 to prevent a more severe outage.

The key point is that a 503 is meant for a temporary condition. Unlike a 404, which means a page is gone for good, or a 200, which makes an error screen look like a normal response, a 503 conveys the signal "we can't handle this right now, but we'll be back soon."

Recommended SEO Use

Google Search Central recommends returning a 503 rather than a 404 (Not Found) or a 200 (OK) when you take a site down briefly for planned maintenance. A 503 tells search crawlers that the downtime is temporary and that they should check back later. Returning repeated 404s causes Googlebot to delay recrawling, while serving error pages with a 200 leads to the problem of empty pages being indexed as legitimate content.

The header to use alongside it is Retry-After. Per MDN, Retry-After indicates how long the service is expected to be unavailable in a 503 response, and it can be expressed in two formats: an integer number of seconds to wait after receiving the response, or a specific point in time to retry, given in HTTP date format. Googlebot honors this header and adjusts when it recrawls accordingly.

That said, a 503 should not be used as a permanent fix. Google Search Central states that while a 503 is appropriate for temporary downtime, if it persists for more than a few days Google may interpret it as a sign that the server has become permanently unavailable and remove the affected URLs from its index. In other words, it is safe for a short maintenance window of about a day, but blocking access for a week or more can harm your search results regardless of the method used.

Comparison of Key Status Codes

CodeMeaningSignal to CrawlersFit for Maintenance
200 OKNormal responseThe current content is validPoor (risk of indexing an empty error page)
404 Not FoundPage does not existThe resource is not presentPoor (delayed recrawling, risk of deindexing)
503 Service UnavailableTemporarily unavailableDowntime is temporary, check back laterGood (recommended with Retry-After)

Handling It Correctly

When serving a maintenance page, the most important thing is to confirm that the response headers actually return a 503. According to Yoast, caching plugins sometimes fail to pass the 503 status through correctly, so you must test before applying it to a live site. MDN also notes that because a 503 is a temporary problem, you should be careful not to cache the response, since caching it can leave clients receiving a stale error page even after the fix has been deployed. It is good practice to also provide users with a page that explains the situation.

Apache (.htaccess) Example

RewriteEngine On
RewriteCond %{REQUEST_URI} !=/maintenance.html
RewriteRule ^.*$ /maintenance.html [R=503,L]

ErrorDocument 503 /maintenance.html
Header always set Retry-After "3600"

Nginx Example

location / {
    return 503;
}
error_page 503 /maintenance.html;
location = /maintenance.html {
    add_header Retry-After 3600 always;
    internal;
}

The Retry-After 3600 in the examples above means retry after one hour (3600 seconds). If you know the expected recovery time, set an accurate value, and remove the configuration as soon as maintenance is finished.

Implementation Checklist

  • Return a 503 status code for planned maintenance instead of a 404 or 200.
  • Communicate the expected recovery time (in seconds or as a date) with a Retry-After header alongside the 503.
  • Keep downtime as short as possible, and do not let a 503 persist for several days or more than a week.
  • Verify the response headers directly to confirm the maintenance page actually returns a 503 (watch out for caching plugins).
  • Check your caching headers to ensure the 503 response is not cached.
  • Provide users with a page that explains the situation and the expected time of recovery.
  • Remove the 503 configuration and Retry-After header immediately once maintenance ends.

References and Sources