Skip to content

Maintenance page

A static, branded page served by a Cloudflare Worker in front of the site. A Worker route runs before the request reaches the origin, so the page works even when the server, the database or the tunnel is down.

Customer → Cloudflare → [route enabled?] ─yes→ maintenance page (503)
                              └─no→ tunnel / Pages → site as normal

The Worker only touches traffic while a route points at it. Each domain has a route prepared with Worker: None, which does nothing - turning the page on means switching that route to the Worker.

The Worker is called maintenance-page. Its code is kept in maintenance-worker.js - when you change the Worker in Cloudflare, update that file too.


Which domain

Site What is down Put the page on
Bedrock sites (e.g. barberklingen.dk) Server, database or tunnel The brand's domain
Elome Backend (cms.elome.com) elome.com - the frontend loads, but products, cart and checkout fail
Elome Frontend (Cloudflare Pages) Usually a bad deploy: roll back in Cloudflare Pages instead

Worker routes also run in front of Cloudflare Pages custom domains. This was tested on elome.com on 2026-11-23.


Turn it on

  1. Cloudflare dashboard → the domain's zone → Workers Routes
  2. Edit the route <domain>/* and set Worker to maintenance-page. If the route is missing, add it - and choose a Route, never a Custom domain, which takes over the whole hostname permanently
  3. Open the site in a private window, off the VPN, and confirm the maintenance page is shown
  4. Note the time in the incident log

Turn it off

  1. Edit the route from step 2 and set Worker back to None
  2. Confirm the site loads normally and that checkout works

How the Worker behaves

Request Response
From the office IP or the backup VPN IP Passed through to the origin, so we can test the site and use WP admin
Webhooks and APIs (/wp-json/, /wc-api/, ?wc-api=) 503 with no page. The payment providers retry later
Everything else The maintenance page, 503 with Retry-After

The 503 and Retry-After tell search engines the outage is temporary, so pages are not dropped from the index.

Keep the text short: what is happening, that we are working on it, and how to reach us. One version per language (DA, SE, NL, EN), chosen from the domain.


Setup status

Worker maintenance-page is created. Routes per domain:

Domain Route prepared (Worker: None) Tested
barberklingen.se Yes 2026-11-23
barberklingen.dk Yes 2026-11-23
barberklingen.nl Yes 2026-11-23
kaffedrengen.dk Yes 2026-11-23
elome.com Yes 2026-11-23

Preparing the routes

Do this once per domain. A route with Worker: None does nothing, so none of these steps affect customers.

  1. Zone → Workers Routes. Check that no route exists for <domain>/* already
  2. Test: add the route <domain>/__maintenance-test* → Worker maintenance-page → Failure mode Fail open. Open the URL on mobile data (not office or VPN) - you should see the maintenance page. From the office, the same URL should show the site's own 404 page. Then delete the test route
  3. Prepare: add the route <domain>/* → Worker None. Add www.<domain>/* too if the site uses www.
  4. Open the site and confirm it works as normal
Do Don't
Exact hostnames: elome.com/*, www.elome.com/* Wildcards like *elome.com/* - they also match cms. and staging subdomains
Add routes from the zone's Workers Routes Custom domain - it takes over the whole hostname
Failure mode Fail open Fail closed - if the Worker errors or hits the plan limit, the site is blocked