How to create a more user friendly bad gateway/loading page?

In my setup I am using Traefik as a reverse proxy for multiple application containers which have a delayed startup. When the upstream container is not available yet, Traefik shows the default "Bad Gateway" plain text error message.

Is it possible to customize this in some way and show a nice, more user friendly page?

"Bad gateway" usually happens, when the target service has multiple Docker networks and not all are connected to Traefik container. Make sure to set docker.network globally on provider or locally on Docker service labels.

Try errors middlewares (doc):

The Errors middleware returns a custom page in lieu of the default, according to configured ranges of HTTP Status codes.