Jump to content
xisto Community
nightfox1405241487

Backup DNS For Domain

Recommended Posts

Hey,I'm not sure the technical term, but you know how domains have primary and secondary name servers? Well, I know that when you go to a domain, it queries NS1.ASTAHOST.COM (for example if you were hosted here) and if NS1 is down, it goes to NS2. Well, what I have a web server running on my network and what I'd like to do is have it setup with a "Site Temporarily Down" message and then if the server goes down for example.com, NS1 & NS2 also go down, have it redirect to a third DNS server to redirect it to the server on my network with the "Site Down" message.How do I do this? Thanks!I'm not sure where this belonged, but please move it if you feel it belongs somewhere else! :)[N]F

Share this post


Link to post
Share on other sites

Theoretically:

 

First of all your domain name provider should be allowing you to add a third nameserver (2nd backup) for your domain. I recall mine allowed more than two.

 

Then you should have the third nameserver available from which the address the name converts to would be different, i.e. the one of the "site down" server.

 

 

But I don't think this'll work. See, everytime someone accesses your site by domain, he gets connected to a same nameserver which caches name-address pairs. If the name-address pair isn't available at the nameserver the nameserver queries another server further in the network and this way tries to acquire the name-address pair. The name servers are updated from other servers with a certain interval. The key point is that the nameservers you have selected in your domain settings are not accessed everytime someone requests a page from your website.

 

Basically it is possible to have different addresses for a certain domain but in your case some of the traffic will still be directed to the address of the server that is down.

Share this post


Link to post
Share on other sites

Hey,
I'm not sure the technical term, but you know how domains have primary and secondary name servers? Well, I know that when you go to a domain, it queries NS1.ASTAHOST.COM (for example if you were hosted here) and if NS1 is down, it goes to NS2. Well, what I have a web server running on my network and what I'd like to do is have it setup with a "Site Temporarily Down" message and then if the server goes down for example.com, NS1 & NS2 also go down, have it redirect to a third DNS server to redirect it to the server on my network with the "Site Down" message.

How do I do this?

Thanks!

I'm not sure where this belonged, but please move it if you feel it belongs somewhere else! :)

[N]F



Hey Nightfox,
Theoretically itâs a sound idea but it would not work. See NS DNS propagation works by searching the fastest server. This is usually done by sending a ping request to the NS. The fastest readout becomes the default NS. See NS1 or NS2 does not mean itâs the first and second NS it is just a name. So my just adding two additional name servers would only mess your site up. You would see your website constantly going from your website to the backup site. Hope that makes sense.

So what can you do?
If you have your own house server and have your own Name Servers you could register them into your domain Name Servers setup account and just turn of your home server. That way, when the DNS pings out your NS they would not exist. Now when your hosting account goes down you would just have to turn on your home server.

Wait but you want them to start automatically right?
Well you could probably find a free or paid service which could contact you when your server is down (Search Google). I have done this several years ago and donât know if it can be repeated again. I had my website monitoring service send me an e-mail that the server was done. Then I created a script to execute a batch script if an e-mail was send from a certain e-mail. The batch script would then initiate my apache service. Thatâs all I did.

Hope this helps, itâs a great idea but it takes a lot of work. Even though I did this on a windows system, I recommend to use a Debian or any other great linux distribution.

Share this post


Link to post
Share on other sites

So what can you do?If you have your own house server and have your own Name Servers you could register them into your domain Name Servers setup account and just turn of your home server. That way, when the DNS pings out your NS they would not exist. Now when your hosting account goes down you would just have to turn on your home server.

Wait but you want them to start automatically right?

It should also be possible to have your own sever try and ping the other nameservers. If it can find them, it can simply forward the data, or send no response to the ping, so that the machine looking for the site will go with another nameserver. If your server can't reach the proper site through the proper nameservers, then it can send the appropriate data to point to the backup site. At least, from what I know of networking, that is theoretically possible. I have no idea how to go about doing it, though.

~Viz

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.