This module allows a Drupal site to return a 200 OK status code instead of the default 503 Service Unavailable when in maintenance mode. This enables caching layers like CDNs or Varnish to cache the maintenance page, serving it to visitors and reducing load on the origin server. However, remember to clear the cache to bring the site back online after maintenance.
Overview
The Maintenance 200 module allows a site to return a Status code of 200 rather than the default 503 (Service Unavailable) code.
"But wait," you ask, "why would I want that? The site is truly in a 503 state and should report that." The reason you'd want to return a 200 is so that your CDN or caching layer (e.g., Varnish) will cache the maintenance page and serve it to new requests rather than passing the request down to your origin server.
Admittedly, this is kind of a double edge sword, since once the page is in cache you'll have to flush your cache to bring the site back up, which may incur more origin load than is spared by caching the maintenance page, but c'est la vie.
Related Modules
Varnish Maintenance Mode provides similar functionality specifically for Varnish.
Notes about the 8.x version
Remember, this is open source; patches are welcome and if it breaks you get to keep the pieces.
Ask your assistant about Maintenance 200
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 8.x-2.1 | Stable | 9–10 | Oct 13, 2023 | ||
| 8.x-2.x-dev | Dev | 9–11 | Oct 13, 2023 |