I have received this question many many times over the years as an internet … person… most recently from our new graphic artist contractor, a fine young man from Joseph Turner Graphics. And it’s a very valid question, since people are often told things like “Your website won’t be up until DNS propagates which could be as long as 72 hours.” 72 hours! This is the age of the Internet! 72 hours is an enormous amount of time. Why does it take so long? Why is the range so gaping? I mean if it was EXACTLY 72 hours, that’s more believable than “could be one hour, could be 12, could be 39, could be 72”.
Unfortunately, there is a reason. And it’s one that no one has control over.
First, we start with the concept of an IP address. It’s a series of 4 numbers, each between 0 and 255, that tell all other computers in the world where to send information they want your computer to get. Think of it as your computer’s internet phone number. No one talks to anyone on the internet without their IP address, just like no one calls anyone else without a phone number. Now there are some exceptions to this, but that goes way beyond the scope of this. But I have to say that or else someone will comment “What about NAT translations or IPv6?” Yeah, we know.
Anyway, So all the computers, servers, internet enabled devices, and your new super cool hair brush that you can access over the web all have to have an IP address so it can talk to the world. That is a lot of numbers. Most people can’t remember their grandmother’s phone number, much less the millions of other numbers out there they might want to reach, so how in the world do we get our computers to talk to Facebook’s servers when we don’t have their IP addresses memorized? The answer is DNS.
DNS is the Domain Name Server architecture established decades ago to solve this problem. It is like a huge phone book. For those of you who don’t know what that is, it’s a book that used to match phone numbers to names of people and businesses back before you could just ask Google what the phone number is to Jerry’s Pizza.
So here’s how it works. You type in www.facebook.com into your web browser.
Your computer goes “www.facebook.com, what the deuce is that!? I can’t talk to a name, I need a number!”
And so it marches out to your local DNS server, usually run by your ISP, and says “Hey! I need a number for www.facebook.com please.”
The DNS server looks through it’s local directory listing and if it finds facebook.com, it tells your computer what the IP address is. If, however, it does not know what the IP address is, it puts your computer on hold while it goes out and finds out. It does so by first going to the Super Big DNS servers that handle everything and ask for the DNS servers that are in charge of “.com” names. Then it goes to the .com DNS servers and asks for the DNS servers responsible for facebook.com. Then it goes to the facebook.com DNS servers and asks for the www.facebook.com IP address. It then returns and politely gives that number to your computer.
Now that is a very long and expensive (time wise) process. It can take over 500 milliseconds sometimes! That’s an eternity in computer time, and so your ISP’s DNS servers will write down the number in case two minutes later someone else asks it for www.facebook.com’s IP address. That way it can just give it to them without having to go ask all the other DNS servers for that information again.
But wait! The internet is always changing and so if a DNS server is remembering an old IP address then we have a problem. We somehow need to tell it to forget the old one and go out and find the new one. So here’s what happens.
When your ISP’s DNS server writes down the IP address to www.facebook.com, it also writes down the time that it went out and found that. And it writes down how long it is going to consider that IP address valid before it goes out and asks for it again. Usually it’s four hours. So in four hours if someone asks it for www.facebook.com again, it is going to go out and ask all the other DNS servers for that IP again so it can pick up on any changes.
The time between www.facebook.com changing their IP address and the time in which the ISP DNS server asks for the new IP is called the propagation time, which in our example here could be as long as 4 hours, if it just barely wrote down the old IP. But it could be as quick as 400 milliseconds if the four hours just ended.
Now, there are thousands of local, ISP run DNS servers all over the world. And some of them are in far away countries where the internet connection is slow, and so they wait to re-ask for IP addresses a lot less frequently. Some even wait a week. But generally, we don’t care about those ones. We just estimate that everyone will update sometime, for sure, in the next 72 hours.
So that’s how DNS works and why propagation is such a pain when moving your site and changing its IP address. Too many servers that need updating and no way to control them all.
But that’s the Internet, and we love it anyway.