How do nameservers work?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Please forgive me if this is the wrong NG to ask this one. If so,
please direct me to the correct one.

Can anyone explain EXACTLY how nameservers work?

Here's my situation, and what I think will work, but I need to confirm
it with people more knowledgable than myself.

I was using BigBytes as a host provider up until a few weeks ago, at
which time I switched to Hostgator. They basically have the same
systems, but BigBytes had an unacceptable amount of downtime for me.

I had a private nameserver with BigBytes of and When I switched, I changed the IP addresses for, and it changed the IP for all of the sites that are
hosted beneath me.

But since Hostgator is a new provider for me, I would like to have a
little security in case their server goes down. Ideally, I would be
able to keep data on both Hostgator and BigBytes, so if Hostgator goes
down, the sites and email will automatically kick over to the BigBytes

Theoretically, I should be able to do this by having BigBytes set my
private nameservers to and, then list
all 4 addresses on my domains; the first 2 pointing to Hostgator, and
the last 2 pointing to BigBytes. This way, if ns1 and ns2 stop
responding, it will automatically look at ns3 and ns4.

I've already asked BigBytes to change the nameserver to ns3 and ns4,
which they have done, but I haven't added them to my domains yet.

Am I correct in thinking that it's going to work this way? If so, how
long does it take for the domain to realize that ns1 and ns2 aren't

Re: How do nameservers work?

Quoted text here. Click to load it

That won't work.

Re: How do nameservers work?


Quoted text here. Click to load it


The suspense is killing me. What is the answer to the poor chap's



The Probert Encyclopaedia - Beyond Britannica

Re: How do nameservers work?

Quoted text here. Click to load it

The nameservers are chosen at random from the list whether or not the site
is actually up at either server. Plus anyone who recently visted the site
will have the IP cached at their ISP for several hours. I've tested it in
the past, and have had customers who instead of changing the nameserver
information to our servers they appended our nameservers to the list. Half
the time their site comes up, half the time it goes to the old server and
gets a 404 error.

Re: How do nameservers work?

Quoted text here. Click to load it

This might be a better solution:
But still doesn't solve the IP caching problem I don't think.

Re: How do nameservers work?

Pondering the eternal question of "Hobnobs or Rich Tea?", Jason finally

Quoted text here. Click to load it

No. You are completely incorrect. The only time that any attempt to
resolve your domains will look at the ns3 and ns4 are when the
nameservers ns1 and ns2 fail, not when the site pointed to by ns1 or ns2

Dylan Parry -- Where the Music Progressively Rocks!

Usenet: The first post is free, but the next will cost you your soul.

Re: How do nameservers work?

Quoted text here. Click to load it

I was afraid of that. What would make ns1 and ns2 fail? Would they not
fail if the servers go down, or a router stops responding?

(I don't mean for that to sound like I'm being smart, I'm seriously
trying to learn)

Re: How do nameservers work?

On Fri, 25 Nov 2005 12:00:09 +0000, Dylan Parry put finger to keyboard
and typed:

Quoted text here. Click to load it

That's not quite right, either. All four of the nameservers will be
queried at random, there isn't any preference between them. So people
will randomly get either site, depending on which nameserver their own
system happens to use.

-- - phone and email contacts for Amazon, eBay,
"Emotions run deep as oceans"

Re: How do nameservers work?

On 25 Nov 2005 01:46:41 -0800, Jason put finger to keyboard and typed:

Quoted text here. Click to load it

It isn't going to work. What you want can't be done with DNS, at all.

If there are four DNS servers listed for a domain, then remote clients
will pick from them at random to query. They will then use the data
returned by the server that they pick. If that data happens to result
in a site that's unreachable, then the client will give an error
message - it won't go back to a different nameserver to see if that
one has any differnet information.

If one DNS server is offline, then they will pick another one, and so
on until all are unusable. But, having found one that returns data,
that data is assumed to be correct. If that data leads to a site
that's offline, that's the fault of the site, not the DNS, so there's
no reason for the DNS to try anything else.

-- - read and share comments and opinons
"L'amore giunger, l'amore"

Re: How do nameservers work?

On Sat, 26 Nov 2005 10:23:18 +0000, Mark Goodge

Quoted text here. Click to load it

The O'Reilly book "DNS and BIND" is good for anyone who *really* wants
to know "How do nameservers work?".

"It's incredibly positive for the Internet."
AOL president Raymond Oglethorpe, commenting
on the anthrax attacks via mail.
Newsweek magazine, 5 November 2001, page 25.

Site Timeline