Free auditStart free
GuideDrupal · Downtime

Drupal maintenance mode and SEO

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 withChatGPTClaudePerplexityGoogleAI Mode
01How 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
02Who 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.

03Worth 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 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. 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 home page placeholder with a 200 status instead, and notes that ramping back up after a prolonged period will be significantly harder.

04How 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, and for crawl rules see 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 in Search Console for server errors.

Questions

Asked a lot.

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

01What 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.

02Is 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.

03How 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.

04Who 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. 01Enabling and disabling maintenance mode | Drupal APIapi.drupal.org · checked 2026-10-24
  2. 02MaintenanceModeSubscriber class | Drupal APIapi.drupal.org · checked 2026-10-24
  3. 03MaintenanceMode class | Drupal APIapi.drupal.org · checked 2026-10-24
  4. 04Drupal core .htaccess (11.x) | Drupal.org GitLabgit.drupalcode.org · checked 2026-10-24
  5. 05maint:set | Drushdrush.org · checked 2026-10-24
  6. 06Temporarily pause or disable a website | Google Search Centraldevelopers.google.com · checked 2026-10-24
  7. 07HTTP status codes, network and DNS errors | Google Search Centraldevelopers.google.com · checked 2026-10-24
Free · 2 minutes

Tools point. Agencies advise. This one ships.

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

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane