Draft a maintenance page, exclude health paths, and serve it only after Deploy
Maintenance mode answers every matching request with your own page instead of proxying to the origin. It is drafted like any other configuration change, so you can prepare and review the page before a single visitor sees it.
1. Open the maintenance section#
On the domain detail page choose the Advanced category and the Maintenance section (Temporary maintenance page settings.). The panel prepares a domain-wide maintenance response as a draft: an enable toggle, separate desktop and smartphone HTML, and the list of excluded paths that must keep working.
2. Write the page and set exclusions#
Provide the desktop and smartphone markup for the page, then exclude the paths that must stay reachable while the site is down — /health for load balancers, and /api/** for any API your clients poll. Excluded paths are matched before the maintenance response, so they always pass straight through to the origin.
3. Deploy#
Saving changes nothing for visitors; the origin keeps serving until you press Deploy. Once deployed, matching requests answer with 503, your HTML, a retry-after header, and a maintenance marker response header, while excluded paths continue to reach the origin normally.
Expected result#
Visitors receive your page with a 503 status, search engines and uptime monitors see the maintenance marker, and health checks keep passing. Re-enabling the toggle and deploying again returns the domain to normal proxying.
Plan for real outages first#
Maintenance mode is for planned work. If the origin is simply down, origin health checks and backup origins — see Manage origins — keep traffic flowing without a page switch.
Choose the right status#
Matching requests answer with 503 so crawlers know the outage is temporary, alongside your HTML, a retry-after header, and a maintenance marker response header. If your page is meant to be found later rather than retried, remember that a maintenance window suppresses indexing for everything not excluded.

