Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've been reading about DNS failovers and a bunch of other technical terms however I'm a bit of a newbie in this so it all sounds Greek to me. Basically here's what I just need:

I have two shared hosting accounts from two different providers (Server A and Server B). Each of this accounts contain exactly the same website content.

On a normal day, typing my domain name should point to the IP of Server A. But on a bad day in which Server A is down or unreachable, my domain name should point to the IP of Server B in the fastest way possible.

How do you achieve this and what services can you recommend if any? Thanks.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The simple answer is to use a content distribution/delivery network to handle your traffic. They already have the infrastructure in place to handle failover like this.

If you must host it yourself, one route to take is this:

  • Set the DNS TTL very low
  • Set up a server which monitors the web servers
  • If one of the web servers goes down, automate a script on the monitoring server to modify the DNS and remove the failed server

My first recommendation is still to use a CDN, though.

share|improve this answer
Thanks for the reply. Can a CDN be used as a host for an entire website? I thought it's only used for storage. –  IMB Mar 25 '11 at 19:53
CDNs are generally best for static content (HTML, JS, CSS, images, etc), but some CDN hosts offer whole site delivery for sites with server-side applications. It's not cheap, though, but 99.999% uptime never is. –  Hyppy Mar 25 '11 at 20:03
If that's the case then I would need a CDN that offers whole site delivery because a normal CDN implementation will not achieve my goal right? –  IMB Mar 25 '11 at 20:19
I don't know. Do you run any server-side applications? –  Hyppy Mar 25 '11 at 20:22
Search for 'DNS failover'. Some companies offer it inexpensively. –  Seun Osewa May 9 '11 at 4:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.