Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I don't really understand how the internet and DNS works. I am inundated with terms I don't understand when trying to read about it on wikipedia. I don't have a computer science background.

When changing a Name Server record from to, what's actually happening? I mean, what "machine" or thing is responsible for directing the user's url query from to How will the user know never to go to again?

Likewise, when I change the A record for a domain to point from old IP address to new IP address, what's actually happening? Is it the same thing as changing name server record?


share|improve this question

1 Answer 1

up vote 6 down vote accepted

The record gets delegated from the parent nameservers - it's like a chain (or usually described as an inverse tree.) Every DNS client knows the IP addresses of the root servers - these are a set of servers (I think it's 13) that provide the IP addresses of the registries' servers - Nominet for .uk, eurID for .eu etc.

Your domain is then registered with the registry who have the addresses of your nameservers ( in your example.) Finally your domain's nameserver (or nameservers as you should have two minimum) serve the actual request.

Imagine for example, a client wants to visit

This can be split into three components - the so-called top-level domain (TLD) which the client queries the root servers for - .com in this example. One of the nameservers that would serve this might be - the root servers will give the IP address of to the client - these are known as the NS and glue records.

Next is the actual domain - in this example. The client queries for This may then give back and with the relevant IP addresses as the NS and glue records.

Finally the hostname - www in this example. The client will therefore query either or for the domain, and get back the actual IP address of the website (A record.)

All this takes place in milliseconds. The typical timeout for a DNS resolver is 2 seconds.

To go back to your original question, when you change the nameservers, you're changing the NS records at the registry-level (Nominet, eurID etc.) After your change is made, when a client queries the root servers for, it will get given the IP address of instead of

It typically takes up to 72 hours for all clients around the world to notice the change, because they cache all results for a length of time specified in the domain record. NS records are usually cached for 72 hours or even up to a week. Therefore don't take your old name servers offline for at least a few days after making the change.

Changing an A record is much the same as changing an NS record - you're only changing the content, like changing a database record. The next time someone queries for your record, it'll get the new value (again taking into account caching, but it's much lower for A records, usually 1/2 - 1 day.)

If you've got access to a Linux box, run dig +trace, and you'll see the full chain of queries which might give you a better idea.

share|improve this answer
Thanks for the good and detailed answer. –  bortzmeyer Feb 25 '10 at 15:34
Beautifully explained! –  nitstorm Jun 9 '13 at 6:46

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.