Maintenance Mode


There are many cases where the website should be temporarily brought down.
Moving server, software upgrade that requires an outage, you name it.
It would be natural and logical if Maintenance Mode could be turned on in the Cloudflare admin console.
Is there a way to turn on maintenance mode directly on Cloudflare?

Maintenance Mode?
Moving site connected to Cloudflare to new hosting

What would a Maintenance Mode do?


Maintenance Mode would display a static landing page to all users trying to access the website.

E.g. “Site is temporarily offline for maintenance, please come back later.”

In the meantime site admin could safely do their job, migrate the DB, etc.


This sounds like a job for a Cloudflare App, though if all users got the Maintenance mode page, I’m not sure how you’d be able to admin the site.


Admin could add their ip-address in CF as an exception or access the site directly by IP-address.


Is what you are describing something like Always Online, but with the option to customize the page and deploy on demand?


I don’t think so (though I haven’t tried), as AO is not likely to start working on demand on dynamic pages that were previously uncached. Edge servers will not have cached versions of such pages, and while site is offline, there is nowhere to get those pages from. Also all form submissions will fail leaving users in frustration, as they will not know what happens and why. Overall, this option does not look like an adequate replacement for the Maintenance Mode.


Anyway, can’t tell for sure, depends on how exactly it’s is going to be implemented. What I suggest is a simple solution that switches the site off for a while replacing all URLs with one static page. There may be options, like “turn MM on for all sites on this ip-address”, but overall it should be simple I believe.


Sorry. I didn’t mean to suggest it would work now. Just if that tech could be leveraged somehow.


This is more or less possible with custom error pages and lockdown rules. Lockdown rules display the IP/Country custom block page to visiting clients, so if you create a lockdown rule for your entire domain and only allow access to your own IP, you can use the custom block page to display a maintenance message.

This isn’t perfect, as there’s no separate customization option for the maintenance page, so you’d need to swap out that page with the default or your normal custom block page every time you close the site for maintenance. Lockdown rules are also currently API-only, so there’s no simple button in the UI to start/end maintenance.


I cant imagine why this doesn’t exist already. Asking “what would it do?” seems a little unnerving, since it is one of the most common things in the world for web applications to need?


Add a Maintenance Mode and display a specifc page for single domain, subdomain or all site, in case of transfer hosting or others i think is a good idea =)


You could easily do this with CloudFlare workers - Here’s an example :slight_smile:

Workers are pretty powerful and affordable.

Recipe Request Thread



I’d second that, that would be a nice-to-have.

Right now I use page rules to temporarily redirect traffic to a Twitter posting as long as the service is down.