Anonymous visitor or crawler
- Result
- 503 with the maintenance message
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.
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.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
/admin/config/development/maintenance.Go to Configuration > Development > Maintenance mode in the Manage menu.
Check Put site into maintenance mode. You can edit the message shown to visitors. Save the configuration.
Run your update, migration, or deployment.
Return to the same screen, uncheck Put site into maintenance mode, and save.
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.
drush maint:set 1
# deploy, update, migrate
drush maint:set 0
drush cache:rebuildMaintenanceModeSubscriber 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.access site in maintenance mode)/user_maintenance_access route optionA 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.
"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."
Google says to use the Retry-After HTTP header with a best effort date or duration, use static HTML, and minimize off-page resources.
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.
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.
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.
With maintenance mode on, run curl -I https://example.com/ while logged out. Confirm 503.
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.
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.
After disabling, rebuild the cache, request the home page, and watch the Crawl stats report in Search Console for server errors.
4 questions people ask next, answered from the sources on this page.
503. Drupal's maintenance mode subscriber sets a 503 status for visitors without the permission, with an HTML or plain-text maintenance message.
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.
Run drush maint:set 1 to enable and drush maint:set 0 to disable, then clear caches.
Users with the "Use the site in maintenance mode" permission. The login page at /user stays reachable by anyone.
Run the free audit, then approve the fixes. Every change can be undone.