Who this is for. Developers and project leads preparing a site for go-live. After this page you can build a failover page that works while the site cannot answer, and keep it current in the repository.
What a failover page is
A failover page is a static HTML page served by whatever sits in front of the site, such as a load balancer, a CDN or the web server, when the application cannot answer a request. It is infrastructure rather than a platform feature: the platform has no maintenance mode, and no layout or admin screen configures one. When the page is served is decided by whoever runs the layer in front of the site, so agree the arrangement with them before launch.
What the page can depend on
The page is shown exactly when the application is unavailable, so it uses nothing the application provides: no template syntax, no CMS content, no images from the CMS asset library, no sign-in, no forms and no search. It can use files served as static files: the theme repo's dist/ folder, favicon.ico and the page's own folder.
Where the files live
Keep the page in the theme repo, in a failover/ folder at the root, so it is versioned and deployed with the site. A production site built this way keeps a handful of plain HTML files and an image folder there, none of them a template:
| Path | What it holds |
|---|---|
failover/index.html | The page itself |
failover/top-bar.html, side-panel.html, login-check.html, login-modal.html | Static copies of pieces of the live site's header and side panel |
failover/assets/ | The page's own images: the logo and hero images |
Its index.html does four things worth copying:
- It links the live site's stylesheet from
/dist/with an absolute path, so it looks like the site without a second copy of the CSS. - It loads its images from
/failover/assets/, not from the CMS. - It reloads itself every 20 seconds with
<meta http-equiv="refresh" content="20">, so a visitor who lands on it is back on the live site as soon as it answers, without any JavaScript. - It reproduces the header and navigation as static markup, with the link text and addresses typed in.
A condensed version: