Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

My webhoster seems to have some troubles with DDOS attacks and routing overload. This makes my IP to be not available sometimes and I'd like to add a failover IP for the domain.

However, 2 A-Records means that it's similar to a load balancer which is NOT what i am looking for. I do not want the fallback machine to be accessed any time - except in case of real troubles or downtime of first choice IP.

Is there a out-of-the box solution that allows me such a failover ip?

If not, if it requires a DNS re-configuration: Is there a recommended script or similar that can be run on the secondary machine (of course, this is with a different hoster). This has to check whether the first choice ip is down and must overwrite the A-record, right? This requires my domain hoster to provide an API for the DNS settings...

share|improve this question

marked as duplicate by Tom O'Connor Aug 25 '13 at 21:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 1 down vote accepted

Any DNS provider that supports Dynamic DNS can assist with this requirement.

Let's assume you use DynDns and get a dynamic DNS name of uptime.homeunix.comNote 1. Assume your DynDns username is foobarme, and your password is "LeTmeiN"

  • Assume the address of your primary webhost is
  • Assume the address of your backup webhost is
  • Assume your web service's address is http://solid.rock.local/

Use to assign your primary address to (I'm using linux)...

$ python -a foobarme LeTmeiN

Now CNAME solid.rock.local to

If you need to use the backup webhost, it's this easy...

$ python -a foobarme LeTmeiN

The DNS TTL on these DynDns DDNS records is typically one-minute... pretty low.

Note 1: BTW, is available right now if you like it :-)

share|improve this answer
thanks, can this script also do the reliable check for current ip being down for me? so it's only overwriting the DNS in case of issues with the prefered server. – ledy Aug 2 '12 at 10:11
This script will only assign ip addresses to the DDNS entry... the criteria for changing between your primary and backup webhost is outside it's capabilities – Mike Pennington Aug 2 '12 at 14:50

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