# Laravel maintenance mode and SEO

> Use php artisan down with --retry, --refresh, --secret, --render and --redirect, see the 503 it returns, and follow Google

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

Guide Laravel Laravel · Downtime

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 with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fseo%2Flaravel%2Fmaintenance-mode%20(%22Laravel%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%2Flaravel%2Fmaintenance-mode%20(%22Laravel%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%2Flaravel%2Fmaintenance-mode%20(%22Laravel%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%2Flaravel%2Fmaintenance-mode%20(%22Laravel%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, 4 minutes.

1. [Turn it on and off 01](#turn-it-on-and-off)
2. [The down options that matter for SEO 02](#the-down-options-that-matter-for-seo)
3. [What Google wants during downtime 03](#what-google-wants-during-downtime)
4. [Deploy gotchas 04](#deploy-gotchas)

_01_Check 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](/glossary/http-status-codes) 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
```

_02_php artisan down options (Laravel 13.x docs)

## The down options that matter for SEO

Option

### `--retry=60`

What the docs say

Sets the `Retry-After` HTTP header value, although browsers generally ignore it

SEO note

Use it. Google says to use the retry-after header on a 503 page.

Option

### `--refresh=15`

What the docs say

Sends a `Refresh` header so the browser reloads after that many seconds

SEO note

For people, not crawlers.

Option

### `--secret="token"`

What the docs say

Visiting `/token` issues a bypass cookie

SEO note

Lets you test the live site while it is down.

Option

### `--with-secret`

What the docs say

Laravel generates the secret and shows it

SEO note

Same as above.

Option

### `--render="errors::503"`

What the docs say

Pre-renders the view before dependencies load

SEO note

Avoids errors while Composer dependencies update.

Option

### `--redirect=/`

What the docs say

Redirects all requests to that URL

SEO note

Changes the response from 503 to a redirect. Avoid for SEO.

A search-friendly maintenance window

```
php artisan down --retry=3600 --render="errors::503" --secret="1630542a-246b-4b66-afa1-dd72a4c43515"
```

The secret above is the docs' example. Generate your own, and per the docs use alpha-numeric characters and optionally dashes, avoiding characters like `?` or `&`.

_03_Worth 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](/glossary/indexability) 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.

**Check robots.txt while the app is down**Laravel's docs say the maintenance view is shown for all requests into your application, so do not assume `/robots.txt` is exempt. Run `curl -I https://example.com/robots.txt` with the app down. Google says not to return 503 for it, because that blocks all crawling.

_04_How 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](/seo/drupal/maintenance-mode) and [WordPress maintenance mode](/seo/wordpress/maintenance-mode). For 5xx background, see [server errors 5xx](/seo-issues/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](/glossary/crawl-stats-report) in [Search Console](/glossary/google-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. 01 [Configuration: Maintenance Mode | Laravel 13.x documentation](https://laravel.com/docs/13.x/configuration) laravel.com · checked 2026-10-25
2. 02 [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-25
3. 03 [How HTTP status codes affect Google's crawlers | Google Crawling Infrastructure](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes) developers.google.com · checked 2026-10-25

Questions

## Asked a lot.

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

_01_ What status code does php artisan down return?

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

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

_03_ Is 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](/glossary/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.

_04_ Can 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.

## Keep learning

[All platform guides](/seo)

[Learn How to put WordPress in maintenance mode CMS](/seo/wordpress/maintenance-mode) [Related 5xx server errors Status codes and links](/seo-issues/server-errors-5xx) [Read next Cloudflare: block AI bots Frameworks](/seo/cloudflare/ai-crawlers) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in platform guides
[HubSpot CMS structured data](/seo/hubspot-cms/structured-data) [HubSpot XML sitemap](/seo/hubspot-cms/xml-sitemap) [Adobe Commerce SEO (Magento)](/seo/magento) [Magento page speed optimization](/seo/magento/page-speed)

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

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
