Caddy and Cloudflare Tunnel can block a custom downtime page

A small setup needs to show a custom HTML maintenance page when one service is down. The setup uses Caddy with a and .

Changing Caddy and adding failure timing to the has not solved it. The custom error page content can appear, but the still returns a 502 status code.

That lets Cloudflare treat the response as a server failure and show its own instead. Upgrading Cloudflare for custom error pages is not a good fit because this is a free-plan for a few friends, not a business service.

Key points

  • The goal is to show a custom HTML maintenance page when a home- is down.
  • The setup uses Caddy, a , and .
  • Caddy can show the custom page content while the still reports 502.
  • Cloudflare may intercept that 502 and apply its own error behavior.
  • Free Cloudflare accounts do not make paid custom error pages an attractive fix for a small .
Read original