Free auditStart free
GuideLaravel · Downtime

Laravel maintenance mode and SEO

Use php artisan down with --retry, --refresh, --secret, --render and --redirect, see the 503 it returns, and follow Google's guidance for planned downtime.

4 min
read
3
sources
Oct 22, 2026
updated
Scaplet Editorial Team
author
In one line

Run php artisan down to put a Laravel app in maintenance mode. Requests throw an HttpException with status 503. Add --retry=60 to send a Retry-After header, and php artisan up to leave. Skip --redirect, since a redirect is not a 503.

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
01Check it

Turn it on and off

Laravel's docs say a maintenance mode check is part of the default middleware stack. If the application is in maintenance mode, a Symfony\Component\HttpKernel\Exception\HttpException is thrown with a status code of 503.

To change the page visitors see, define your own template at resources/views/errors/503.blade.php.

Enable and disable
php artisan down
# deploy, migrate, update
php artisan up
03Worth knowing

What Google wants during downtime

Status

"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." That is what artisan down does by default.

Retry-After

use the retry-after HTTP header with a best effort date or duration. In Laravel that is --retry.

Not the first choice

Google recommends keeping the site online with limited functionality (for example, disabling the cart and showing a banner), and calls disabling the whole site not recommended. Use artisan down only when you must.

Static and light

Google says to use static HTML and minimize off-page resources. --render helps here because Laravel returns that view at the very beginning of the request cycle, before your application's dependencies have loaded.

robots.txt

don't return a 503 for it, because this blocks all crawling.

Duration

the 503 advice is for 1-2 days. For longer, Google says to provide an indexable home page as a placeholder with a 200 status code. Google says already indexed URLs that return 5xx are preserved but eventually dropped, and URLs that persistently return a server error are removed from the index.

04How it works

Deploy gotchas

  • Several servers: by default Laravel uses a file-based check, so php artisan down has to run on each server. Set APP_MAINTENANCE_DRIVER=cache and APP_MAINTENANCE_STORE=database (any store all servers can reach) and you run it on one.
  • Errors mid-deploy: a significant part of the framework has to boot to render the maintenance view, so users can still hit errors while Composer dependencies update. Laravel's answer is the --render option.
  • Queues: no queued jobs are handled while the app is in maintenance mode. They resume afterward.
  • Downtime is several seconds: the docs suggest a platform such as Laravel Cloud for zero-downtime deploys.

The same pattern for other stacks: Drupal maintenance mode and WordPress maintenance mode. For 5xx background, see server errors 5xx.

  1. 01

    Test

    With the app down, run curl -I https://example.com/ and confirm a 503 status. If you used --retry, look for the Retry-After header too.

  2. 02

    Bring it up

    Run php artisan up, then request the home page and a deep URL to confirm 200.

  3. 03

    Watch crawl errors

    Check the Crawl stats report in Search Console for server errors after long windows.

Sources · 3

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • laravel.com
  • google.com
  1. 01Configuration: Maintenance Mode | Laravel 13.x documentationlaravel.com · checked 2026-10-25
  2. 02Temporarily pause or disable a website | Google Search Centraldevelopers.google.com · checked 2026-10-25
  3. 03How HTTP status codes affect Google's crawlers | Google Crawling Infrastructuredevelopers.google.com · checked 2026-10-25
Questions

Asked a lot.

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

01What status code does php artisan down return?

503. Laravel throws an HttpException with a 503 status code when the app is in maintenance mode.

02How do I add a Retry-After header in Laravel?

Run php artisan down --retry=60. The value becomes the Retry-After header, though the docs note browsers generally ignore it.

03Is Laravel maintenance mode bad for SEO?

It can be fine for short downtime, but Google does not recommend disabling a site if you can avoid it. Google says a 503 with an informational page suits 1-2 days of downtime, with Retry-After and a robots.txt that still answers. It prefers limiting functionality instead. For a longer closure it says to serve an indexable placeholder home page with a 200.

04Can I still access the site while it is down?

Yes, with --secret. Visiting the secret URL sets a cookie that lets your browser use the site as if it were not in maintenance mode.

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