Documentation

Backup Server (Failover)

Keep your site up when your server goes down: DomainDock switches visitors to a second copy within seconds.

How it works

Free hosting goes down: a server restarts, an app runs out of free hours, a deploy breaks. With a backup server, DomainDock keeps your domain answering:

  1. Every 10 seconds DomainDock requests a health check path on your domain's own target.
  2. While that check fails, visitors get the backup instead.
  3. As soon as the check passes again, visitors go back to your own target.

No DNS changes are involved, so the switch takes seconds, not minutes.

Add a backup

Switch on Backup server under Options while creating a domain, or later:

  1. Open the domain's page and go to Routing.
  2. Under Backup server, click Add backup.
  3. Enter the backup's address: a domain like myapp-backup.onrender.com or an IP with its port.
  4. Enter the health check path, then click Save backup.

The backup goes through the same checks as any target. It must be a different server from the domain's own target. The domain's target can't be changed to the backup's address either: there would be nothing left to switch to.

Choosing the health check path

A check passes when your app answers with a 2xx or 3xx status. Anything else (a 404, a 500, a login page answering 401) or no answer at all counts as down.

  • If your home page answers 200, the default / works.
  • If it doesn't (it needs a login, for example), add a small endpoint like /health that answers 200 while your app works. Use that path.

When you save, DomainDock tries the path once. If your target fails it right away, you'll see a warning, because visitors would get the backup until it passes.

Changing or removing the backup

Change edits the address or the health path. The bin icon removes the backup after you confirm: if your server goes down afterwards, visitors see the status page instead of the backup.

With a tunnel

A tunnel domain can have a backup too. While the agent on your computer is off, visitors get the backup instead of the "tunnel offline" page.

Good to know

  • Down alerts still tell you when your own server stops answering, even while the backup serves visitors.
  • The backup only covers the domain's own target. Paths keep their own servers.
  • Your backup receives the visitor's real IP address in the X-Forwarded-For and X-Real-Ip headers, like your main server.
  • Keep the backup up to date. Visitors may land on it at any time.

Try it on your own app

Get a free domain with HTTPS in under a minute. No credit card.

Get your free domain
Newsletter

Developer infrastructure, in your inbox

New guides on domains, SSL certificates and deploying to your own server. A couple of emails a month at most.

No spam. Every email has a one-click unsubscribe.