Website Maintenance Page: How to Take Your Site Offline Safely
Published November 25, 2026 · Last updated November 25, 2026 · By the WebSolutions LLC team
A website maintenance page is the temporary page visitors see while a site is offline for updates or repairs. To protect your search rankings, it should return an HTTP 503 "Service Unavailable" status, ideally with a Retry-After header, rather than a normal 200 page or a 404 error, and it should stay up for as short a time as possible, a day or two at most. Your robots.txt file should stay available throughout. This guide explains why, how to set one up on WordPress or a custom site, and when you can avoid taking the site offline at all.

When do you need a maintenance page?
- A database or server upgrade that cannot run while visitors are using the site.
- Moving the site to a new host when the old and new copies cannot run side by side.
- Launching a redesign that replaces the whole site at once.
- Fixing a serious fault, such as a hacked site or a broken checkout, where showing the site would cause harm.
For many routine jobs you do not need one. Plugin and theme updates, content edits and most redesign work can be done on a staging copy and published in minutes. Our website maintenance checklist explains how to plan routine updates so the site stays online.
Why the status code matters
Search engines judge a page by its HTTP status code as well as its content. A maintenance page that returns the wrong status can do real damage:
| Status returned | What search engines understand |
|---|---|
| 503 Service Unavailable | The site is temporarily unavailable; come back later. This is the right choice for short downtime. |
| 200 OK with a "back soon" message | This is the real content of the page. Google may treat it as a soft 404 or index the maintenance text. |
| 404 Not Found or 410 Gone | The page no longer exists and can be dropped from the index. |
| Redirect to a single maintenance URL | Every page now points to one page, which confuses indexing and links. |
Google's documentation explains that when it receives 5xx errors such as 503, it temporarily slows down crawling, keeps already-indexed URLs for a time, and eventually drops URLs that persistently return a server error (Google Search Central: HTTP status codes and network errors). It also notes that a 2xx page whose content looks like an error can be reported as a soft 404.
How long can a site stay in maintenance mode?
As briefly as possible. Google's guidance on pausing a site says that taking a whole site offline is an extreme measure that should only last a very short time, a few days at most, and that a 503 is suited to short outages of about one to two days. For longer closures it recommends keeping the site online with limited functionality instead (Google Search Central: temporarily pause or disable a website). While pages return 503, Google also cannot refresh their titles, descriptions or structured data.
Rules for a search-friendly maintenance page
- Return HTTP 503 for every page that is unavailable.
- Add a Retry-After header with the number of seconds (or a date) until you expect to be back. The header is defined in the HTTP standard for use with 503 responses (RFC 9110: Retry-After).
- Keep robots.txt available and returning its normal content. Google warns against returning a 503 for robots.txt, because that blocks crawling of the whole site, and against disallowing all crawling during a pause (Google Search Central).
- Do not add noindex or use removal tools; they can take pages out of search for much longer than the outage.
- Use a simple static page that does not depend on the database or scripts you are working on.
- Tell visitors what is happening: that the site is down for planned work, roughly when it will be back and how to reach you in the meantime, for example by email.
- Let yourself in. Allow your own IP address or logged-in administrators to see the real site so you can test it before reopening.
- Check the status with a header checker or a command such as
curl -I https://example.com/, which shows the status line and headers.
What to write on a maintenance page
Keep it short and helpful. A good maintenance page includes your business name and logo, a one-line explanation such as "We are carrying out planned maintenance", the expected return time with a time zone, a contact email address for anything urgent, and links to your social profiles if you post updates there. Avoid promising a time you cannot meet; update the message if the work runs over, and update the Retry-After value too.
How to set up a maintenance page on WordPress
WordPress switches itself into a basic maintenance mode during core, plugin and theme updates. It creates a temporary .maintenance file in the site root and shows a short "briefly unavailable for scheduled maintenance" message with a 503 status until the update finishes. If an update is interrupted and that file is left behind, the site stays stuck on the message; deleting the .maintenance file from the root folder fixes it.
For planned work you control, use a maintenance mode plugin from the WordPress.org plugin directory and confirm in its settings that it sends a 503 status, not 200. Then:
- Take a full backup of files and database.
- Switch maintenance mode on and check the status code from a logged-out browser or a header checker.
- Carry out the work and test it while logged in.
- Switch maintenance mode off, clear any caches and check key pages, forms and the checkout.
How to set up a maintenance page on a custom PHP site
On a hand-built PHP site, the simplest method is a small maintenance file that every page includes at the top while the work is running. It needs only three things: a 503 status code, a Retry-After header and a short HTML message. In PHP, the first two are set with http_response_code(503); and header('Retry-After: 3600'); before any output, where 3600 means one hour. Remove the include as soon as the work is finished. Servers such as Apache and Nginx can also return a 503 page through their configuration; ask your host or developer which method fits your setup, and see our guide to static vs dynamic websites if you are unsure how your site is built.
Alternatives to taking the site offline
- Use a staging site. Make and test changes on a private copy, then publish them in one quick step.
- Limit functionality instead. Disable only the shop, booking form or login area and show a clear notice, while the rest of the site stays online. This is what Google recommends for longer pauses.
- Schedule work for quiet hours, which you can find in your analytics.
- Move hosts without downtime by building the new copy first and switching DNS once it is tested, as described in our website migration checklist.
After maintenance: a quick check
- Confirm the home page and key pages return 200 again, and robots.txt is unchanged.
- Test contact forms, checkout and log-in.
- Check speed and errors; our website speed optimization guide lists useful tools.
- Watch Google Search Console for server errors over the next few days.
If you are planning a larger change, our website redesign checklist covers the full process. For help with planned maintenance, updates or a migration, see our website maintenance and hosting services or contact us.
Maintenance Page FAQs
Short answers to common questions about maintenance pages and maintenance mode.
What status code should a maintenance page return?
A 503 Service Unavailable status, ideally with a Retry-After header. It tells search engines the downtime is temporary. A 200 page can be indexed or treated as a soft 404, and a 404 tells them the page is gone.
Does maintenance mode hurt SEO?
A short outage with a correct 503 status usually causes little harm. Crawling slows while errors continue, and URLs that keep returning errors for a long time can be dropped from Google's index.
How long can a website be down for maintenance?
As short as possible. Google describes taking a whole site offline as an extreme measure for a few days at most and suggests 503 for outages of about one to two days. For longer pauses, keep the site online with limited features.
Why is my WordPress site stuck in maintenance mode?
An interrupted update can leave the temporary .maintenance file in the site root. Deleting that file through your host's file manager or FTP usually brings the site back, after which you should rerun the update.
Should I block search engines during maintenance?
No. Keep robots.txt available and do not add noindex. Blocking crawling or returning a 503 for robots.txt can affect the whole site and can remove pages from search for longer than the outage.