DNS

How does your computer or phone know how to go from google.com to that awesome multi colored logo and a text box underneath it?

Computers speak to each other over the internet using IP Addresses. Those are numbers that look like 192.168.17.242. You can consider them like the phone numbers of every single computer out there.

When you want to go to a website, like google, your computer needs to somehow find the real IP address that “google.com” points to. This is similar to how you probably don’t even remember your mom’s phone number anymore, and it’s just in your phone. You lookup “mom” in your phone, and your phone, using its contact list feature, does the figuring out that the real number you want to dial is 917-555-whatever.

On the internet, the DOMAIN NAME SYSTEM or “DNS”, is the contact list. When your browser first goes to google.com, the browser asks the operating system (mac or windows) “Hey, do you know the real ip address for google.com?” If the operating system doesn’t know, because it’s never looked it up before, the browser then queries the DNS using addresses that are provided to you by your internet service provider.

Not every request will necessarily get back an ip address though, since the internet is utterly gigantic, no one computer knows exactly all of the ip addresses for every possible name. Instead of that, there’s a heirarchy of what are called “nameservers”. Your browser and operating system knows how to work with them to find the right number every time.

Without DNS, we’d have to memorize all of these long numbers, just like we used to pre-cell phones and their wonderful memory for numbers and names.

Share this page
chat