1

We are considering to self-hosting for a domain. How can we provide a page to visitors in case of failure, such as loss of network connectivity, server failure or power failure?

womble
  • 95,029
  • 29
  • 173
  • 228
Tom
  • 209
  • 1
  • 4
  • 1
    Note that this is loosely related to this ServerFault question: http://serverfault.com/questions/6702/ – Justin Scott May 11 '09 at 13:20
  • What I did when faced with the same requirement was to rent four servers at four different hosting providers to serve as independent replicas for our zone. – kasperd Oct 22 '15 at 19:39

5 Answers5

2

This was asked and answered over on Stackoverflow. Summary, you can't reliably do this with DNS, but there are approaches that mess with BGP routing to accomplish this.

However, if you're just interested in handling local failures to your solution, and you are assuming your hosting company is still up and providing service, you can ask them - they may have the capability in their load balancers etc to be able to redirect to somewhere else in their environment.

1

You can't do this with DNS out of the box.

You could use an external DNS server which monitors the page and delivers other DNS information with a low TTL in case it cannot reach the site. BUT this will not work reliably and will also depend on the cache size of DNS servers of clients, and could cause your real site not to be reachable once it is back up due to existing DNS cache entries for the down-site.

Martin C.
  • 670
  • 1
  • 6
  • 12
1

You can use a service like DynDNS to easily change the IP a domain points to. And, they have an API too, so you could use another cheap webhost to verify when the server is down and change the IP, maybe to that same webhost where you can show a maintenance page.

Or, you can install one of the clients that automatically uses a downtime page.

And you can set a low TTL so IP changes propagate more quickly.

Ivan
  • 3,172
  • 3
  • 24
  • 34
  • We have considered dyndns, but how reliable are they. Will it not just be a chicken/egg problem then? – Tom May 11 '09 at 18:18
  • They're extremely reliable per my experience. Been using them for more than 5 years and zero downtime. – Ivan May 11 '09 at 22:09
1

You could host your main domain on a commercial provider and create a page that shows the error message with javascript after a timeout. Then you could include a in the HTML-code. This code would redirect (an frame?) to the real page. Otherweise (javascript-timer?), the error page would be displayed

Now, can I just downvote this answer many times? ;-) Technically it would be a solution given that not so much was cleraly defined in the question. The reason to host in house might be to hook up some internal database, while the main web presence would better be on a commercial hoster.

Christian
  • 1,033
  • 5
  • 16
  • 24
1

A similar question was asked, and answered here

How can I automaticaly change the DNS A record to point my site to a secondary server in case of a failure?

The short answer is, DNS is not a reliable mechanism for managing failover without significant hardware investment, or manual intervention.

Dave Cheney
  • 18,307
  • 7
  • 48
  • 56