When you visit a website, your computer needs to convert a domain name to an IP address. DNS (Domain Name System) does this translation. For example, google.com translates to http://188.8.131.52/
DNS servers are distributed and are constantly updating each other.
Every computer has a name server. If you’re a home user, it’ll most likely point to your router. This can be changed to Google DNS or OpenDNS, etc.
When you register your domain name, the registrar will have some default name servers for you and allow you to change it.
You get this name server from either your registrar, hosting site, or another 3rd party (dnsmadeeasy.com) DNS service. From there you can assign an IP address to your domain name (given by your webhost). Just create an “A” record with “www” and you’re set. Keep in mind some hosts automatically assign you an IP based on your domain name (lunarpages.com) so all you have to do is use their name servers.
This is where the delay comes in. Some DNS companies make the changes immediately and some only update a few times a day. Once the changes are made, it will notify other DNS servers about the change.
How DNS Works:
Your computer has a DNS server it refers to. You can find out what this is by typing “ipconfig /all” in Windows or “cat /etc/resolv.conf” in Linux.
Your local name server doesn’t know anything but the root name servers. Run “nslookup -type=ns .” to find out what your local name server can see.
Your computer uses these root name servers to first look up the “.com” (Top-level Domain) portion of your request which returns a list of TLD name servers.
From this list you’ll look up the second part of the domain “google.com” with “nslookup -type=ns google.com (ip address from list).” This will return a list of name servers that will have the IP of the domain.
Finally type in “nslookup google.com (one of the dns servers from the last list)” and you will get the IP address. Translation is complete!
Now your local name server will remember this translation up to a certain period of time. Your browser will also cache the translation so it doesn’t even have to refer to your local name server.
How long will the translation be cached? This is the main cause of the DNS delay. You can run “dig google.com” to find out how long the TTL (Time To Live) is in seconds. The ANSWER SECTION shows how long the local name server will remember the translation and the AUTHORITY SECTION tells you how long it’ll remember the DNS server used.
If you change the IP of your domain, then the delay length is partially depended up on the speed at which your DNS service makes the changes. This can take a few minutes to 24 hours. My DNS manager (dnsmadeeasy.com) makes the changes instantly.
Once the changes are set, it has to propagate to all name servers which can take a long time. The average is 24 hours. So combined delay from the DNS company and propagation could be up to 48 hours.
Obviously you can make propagation much faster if you change the TTL. Some DNS services don’t allow you to change this value but it can range from 300 seconds (5 minutes) to 86,400 seconds (24 hours). If you have a TTL of 300 set, and you change your IP, it will take the rest of the world 5 minutes to be updated with the new IP.