# Drupal maintenance mode and SEO

> Turn Drupal maintenance mode on and off, see the 503 it returns to crawlers, and follow Google

Canonical: https://scaplet.com/seo/drupal/maintenance-mode

Guide Drupal Drupal · Downtime

Turn Drupal maintenance mode on and off, see the 503 it returns to crawlers, and follow Google's guidance on short downtime and robots.txt.

3 min

read

7

sources

Oct 24, 2026

updated

Scaplet Editorial Team

author

In one line

Drupal maintenance mode returns a 503 status with a maintenance message to visitors who lack the "Use the site in maintenance mode" permission. Turn it on at Configuration > Development > Maintenance mode. Google advises a 503 for 1-2 days of downtime, a Retry-After header, and a robots.txt that still answers normally.

30-second check

## Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fdrupal%2Fmaintenance-mode%20(%22Drupal%20maintenance%20mode%20and%20SEO%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fdrupal%2Fmaintenance-mode%20(%22Drupal%20maintenance%20mode%20and%20SEO%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fdrupal%2Fmaintenance-mode%20(%22Drupal%20maintenance%20mode%20and%20SEO%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Fdrupal%2Fmaintenance-mode%20(%22Drupal%20maintenance%20mode%20and%20SEO%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

On this page

## 4 parts, 3 minutes.

1. [Turn maintenance mode on and off 01](#turn-maintenance-mode-on-and-off)
2. [What crawlers and visitors get 02](#what-crawlers-and-visitors-get)
3. [Google's guidance for planned downtime 03](#google-s-guidance-for-planned-downtime)
4. [Check it before you rely on it 04](#check-it-before-you-rely-on-it)

_01_How it works

## Turn maintenance mode on and off

Drupal's help topic gives the admin path as Configuration > Development > Maintenance mode, at `/admin/config/development/maintenance`.

1. 1

### Open the screen

Go to Configuration > Development > Maintenance mode in the Manage menu.
2. 2

### Enable it

Check Put site into maintenance mode. You can edit the message shown to visitors. Save the configuration.
3. 3

### Do the work

Run your update, migration, or deployment.
4. 4

### Disable it

Return to the same screen, uncheck Put site into maintenance mode, and save.
5. 5

### Clear the cache

The help topic lists clearing the site cache as the final step.

Drush has a dedicated command, `maint:set` (alias `mset`, available from Drush 11.5), that takes 1 to enable and 0 to disable.

Toggle with Drush

```
drush maint:set 1 # deploy, update, migrate drush maint:set 0 drush cache:rebuild
```

_02_Who sees what

## What crawlers and visitors get

In Drupal core, the `MaintenanceModeSubscriber` class sets a 503 status. For HTML requests it renders a bare page with the maintenance message; for non-HTML requests it returns the message as `text/plain` with status 503. The subscriber sets no `Retry-After` header, so add one at your web server or CDN.

Request

### Anonymous visitor or crawler

Result

503 with the maintenance message

Request

### User with permission "Use the site in maintenance mode"

Result

Full site access (machine name `access site in maintenance mode`)

Request

### The login page at `/user`

Result

Reachable by anyone, per Drupal's help topic

Request

### Routes that set the `_maintenance_access` route option

Result

Not subject to maintenance mode

A 503 is the right signal for short planned downtime. Google says 5xx and 429 errors make its crawlers temporarily slow down. For indexed URLs, Google says they are preserved but eventually dropped, and content received from a 5xx URL is ignored.

_03_Worth knowing

## Google's guidance for planned downtime

### Short outage

"If you need to urgently disable the site for 1-2 days, then return an informational error page with a 503 HTTP response [status code](/glossary/http-status-codes) instead of all content."

### Retry-After

Google says to use the Retry-After HTTP header with a best effort date or duration, use static HTML, and minimize off-page resources.

### robots.txt

Continue to allow crawling through [robots.txt](/glossary/robots-txt). Google says not to return a 503 for the robots.txt file because this blocks all crawling, and not to disallow all crawling, which may remove content from Google Search.

### Longer outage

Google says to disable a site for only a very short period (a few days at most). For a longer closure it advises an [indexable](/glossary/indexability) home page placeholder with a 200 status instead, and notes that ramping back up after a prolonged period will be significantly harder.

**Don't block crawling to hide downtime**Google says a valid robots.txt that disallows all crawling may remove the site's content, and potentially its URLs, from Google Search. For a short outage, keep the 503 and an answering robots.txt.

_04_How it works

## Check it before you rely on it

Keep downtime short; Google says a few days at most. For URLs that moved permanently instead, see [Drupal redirects](/seo/drupal/redirects), and for crawl rules see [Drupal robots.txt](/seo/drupal/robots-txt).

1. 01

### Test the page

With maintenance mode on, run `curl -I https://example.com/` while logged out. Confirm `503`.
2. 02

### Test robots.txt

Run `curl -I https://example.com/robots.txt`. Google says not to return 503 for it, so confirm it does not. With Drupal's default `.htaccess` on Apache, requests only go to `index.php` when no matching file exists, so a physical `robots.txt` is normally served by the web server directly. Other servers and modules can differ.
3. 03

### Look for Retry-After

Drupal core does not send `Retry-After`. Set it at your web server or CDN with a best-effort date or duration, then confirm it appears in the response headers.
4. 04

### Plan the exit

After disabling, rebuild the cache, request the home page, and watch the [Crawl stats report](/glossary/crawl-stats-report) in [Search Console](/glossary/google-search-console) for server errors.

Questions

## Asked a lot.

4 questions people ask next, answered from the sources on this page.

_01_ What status code does Drupal maintenance mode return?

503. Drupal's maintenance mode subscriber sets a 503 status for visitors without the permission, with an HTML or plain-text maintenance message.

_02_ Is maintenance mode bad for SEO?

Not for short downtime. Google says a 503 is the right response for 1-2 days of planned downtime. It slows crawling temporarily, and long outages risk indexed URLs being dropped.

_03_ How do I enable Drupal maintenance mode with Drush?

Run `drush maint:set 1` to enable and `drush maint:set 0` to disable, then clear caches.

_04_ Who can still use the site in maintenance mode?

Users with the "Use the site in maintenance mode" permission. The login page at `/user` stays reachable by anyone.

Sources · 7

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- drupal.org
- drupalcode.org
- drush.org
- google.com

1. 01 [Enabling and disabling maintenance mode | Drupal API](https://api.drupal.org/api/drupal/core%21modules%21system%21help_topics%21system.maintenance_mode.html.twig/10) api.drupal.org · checked 2026-10-24
2. 02 [MaintenanceModeSubscriber class | Drupal API](https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21EventSubscriber%21MaintenanceModeSubscriber.php/class/MaintenanceModeSubscriber/10) api.drupal.org · checked 2026-10-24
3. 03 [MaintenanceMode class | Drupal API](https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Site%21MaintenanceMode.php/class/MaintenanceMode/10) api.drupal.org · checked 2026-10-24
4. 04 [Drupal core .htaccess (11.x) | Drupal.org GitLab](https://git.drupalcode.org/project/drupal/-/raw/11.x/.htaccess) git.drupalcode.org · checked 2026-10-24
5. 05 [maint:set | Drush](https://www.drush.org/13.x/commands/maint_set/) drush.org · checked 2026-10-24
6. 06 [Temporarily pause or disable a website | Google Search Central](https://developers.google.com/search/docs/crawling-indexing/pause-online-business) developers.google.com · checked 2026-10-24
7. 07 [HTTP status codes, network and DNS errors | Google Search Central](https://developers.google.com/search/docs/crawling-indexing/http-network-errors) developers.google.com · checked 2026-10-24

## Keep learning

[All platform guides](/seo)

[Learn Drupal SEO Content management systems](/seo/drupal) [Related Google Search Console Crawling and indexing](/glossary/google-search-console) [Read next How to put WordPress in maintenance mode CMS](/seo/wordpress/maintenance-mode) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in platform guides
[Docusaurus XML sitemap](/seo/docusaurus/xml-sitemap) [Drupal SEO](/seo/drupal)

More in Drupal SEO
[Drupal maintenance mode and SEO](/seo/drupal/maintenance-mode) [Drupal robots.txt](/seo/drupal/robots-txt) [Drupal URL redirects](/seo/drupal/redirects) [Drupal XML sitemap](/seo/drupal/xml-sitemap)

Terms on this page
[HTTP status codes](/glossary/http-status-codes) [robots.txt](/glossary/robots-txt) [Indexability](/glossary/indexability) [Crawl stats report](/glossary/crawl-stats-report) [Google Search Console](/glossary/google-search-console)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

Run the free audit, then approve the fixes. Every change can be undone.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
