Troubleshooting guide
Maintenance pages and SEO: how to take a site down safely
A maintenance page that returns status 200 tells search engines that your whole site is now one page. Status 503 tells them to come back later.
3 min read11 sectionsUpdated
On this page
Why the status code matters
Search engines treat a 503 as temporary and keep your pages indexed. A maintenance page that returns 200 can be indexed as the content of each URL, and a redirect to /maintenance confuses things further. Google's guidance is that a few days of 503 are okay, while long periods may lead to pages being dropped.
Set it up in Nginx
Toggle by the presence of a file. Allow your own IP through, so that you can test.
# In the server block
# error_page 503 /maintenance.html;
# location = /maintenance.html { root /var/www; internal; add_header Retry-After 3600 always; }
# if (-f /var/www/maintenance.on) { return 503; }
touch /var/www/maintenance.on && sudo nginx -s reload
# Verify from outside
curl -sI https://example.com/ | grep -iE '^HTTP|retry-after|cache-control'
curl -s -o /dev/null -w "robots: %{http_code}\n" https://example.com/robots.txtProcedure
Announce the window on your status page. Enable 503 with a realistic Retry-After. Serve the maintenance page with Cache-Control: no-store, so that no CDN retains it. Do the work, then remove the file. Purge the CDN if it held the 503. Verify key pages, sitemap.xml and robots.txt from outside.
Robots.txt during downtime
Google treats a 5xx on robots.txt as a reason to stop crawling the site. For a short maintenance that is fine, and even helpful. If it persists, for around 30 days, Google may fall back to a cached copy or assume no restrictions. A sensible choice is to keep robots.txt being served normally during maintenance, so that it stays under your control, while all page URLs return 503. Avoid changing it to Disallow: / for the window, because a forgotten block is among the most damaging SEO accidents.
Catch it automatically
Use a maintenance window so that alerts pause and restart on a schedule. An uptime check then confirms that the site came back when it should, including a keyword check that fails if the maintenance page is still being shown.
How long can a site return 503?
A few days is generally safe. Longer outages risk pages dropping from the index.
What should Retry-After be?
A realistic number of seconds, or an HTTP date.
Will rankings drop after a short outage?
Short, properly signalled maintenance does not normally cause lasting harm.
Check it now, free
- Website down checker: Is it down for everyone or just me? Check any site now.
- HTTP headers checker: See the raw response headers of any URL.
- Meta tag checker: Title, description, Open Graph and a Google preview.
Related reading
- 429 Too Many Requests: what it means and how to fix it: 429 Too Many Requests explained: rate limits, the Retry-After header, backoff with jitter for clients, and how to set fair rate limits on your own API.
- Is my website down? How to check and what to do next: Check whether your website is really down: separate local problems from real outages, run DNS, TLS and HTTP checks from outside and find the failing layer fast.
- WordPress monitoring: uptime, speed and errors: Monitor a WordPress site: uptime with content checks, login and admin, Core Web Vitals, PHP errors, plugin updates, SSL expiry and backups.
- Nginx "no live upstreams": how to fix it: Fix Nginx no live upstreams while connecting to upstream: how max_fails marks servers down, why one failure can empty a pool, and how to configure it properly.
- Status page: A hosted public status page that follows your monitors: live component status, 90 days of uptime, incident updates, planned maintenance and a custom domain.
- Website monitoring: Monitor a website around the clock: uptime checks with content assertions, Core Web Vitals from real visitors, JavaScript errors, session replay and alerts.
Watch your own site and services with VitalRix
Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.