Intersites

How Does the DNS Work (or, What Happens When I Type a Website Name Into My Browser's Address Field)?

August 15, 2011 by Eric

Have you ever wondered what happens when you type a website name like 'www.intersites.com' into your browser's address bar?

Okay, maybe not.

Think about this. The Internet is made up of tens of millions of computers. A website "lives" on just one of them. When you sit down and visit a website, how does your computer know which one of those millions of other computers hosts the site you want?

Do you really need to know how two computers find each other? No. In fact, a lot of thought and effort has been put into building a system which just works and is easy for regular people to use. On the other hand, based on my daily experience with users, I believe having a basic understanding of the system will make you a more informed and secure user of the Internet.

The way one computer finds another on the Internet is called the Domain Name System, or DNS for short. 

First, it's very important to understand that each computer on the Internet has an "IP Address". "IP" stands for "Internet Protocol". IP addresses are similar in many ways to a phone number. Every phone has a phone number and every computer has an IP address. 

IP addresses are made up of 4 numbers ranging from 0-255, each number separated by a dot or period. For example, 231.12.139.112 is an IP address.

If you want to call a phone, you dial its phone number. If your computer wants to talk with another computer, it uses its IP address. IP addresses are the only way two computers can make a connection between one another on the Internet. One computer says, "I want to make a connection to 231.12.139.112" and a lot of magic happens and the computers are connected.

One problem with IP addresses is they are not very "human-friendly". We humans are much better at remembering "facebook.com" instead of 69.171.229.16 and "sears.com" instead of 96.6.89.99.

(Here's a good party trick: bet your friends that, by typing only numbers, you can visit the Facebook site. Then type 69.171.229.16 in your web browser's address bar and watch what happens.)

In the very early days of the Internet (before the world wide web), users had to remember and type the IP addresses to connect their computer to another. As the Internet grew, the scientists and engineers building it set out to create a way for administrators to give names to each computer, then develop a system which would convert the name into a good, old-fashioned IP address. They named their creation the Domain Name System. (More evidence why engineers aren't in marketing.)

The DNS is made up of thousands of computers referred to as "servers". Each one of those servers has a list of names and their corresponding IP addresses. You can think of the servers like the old telephone operators. If you wanted to call someone but didn't know the number, you would call an operator and tell them the name. They would have a directory, or list, of names and their numbers. They'd look up the name in the list, then give you the number. The operator's list is not complete, since it would be too big to manage and search. The operators would then ask other operators for the listings they didn't have in their own list. Also, there are 26 special operators called the "root" DNS Servers. These operators are special because they know which operator is responsible for which domain names.

So, what actually happens when you type a name like facebook.com into your computer?

When you turn on your computer at home or at a coffee shop or airport, the router or wireless station gives it the IP addresses of a DNS server (or operator).

For every website you want to visit, your computer contacts the operator and asks it if it knows the IP address corresponding to the name.
DNS Process - Step 1 

If the operator doesn't have the IP address in it's list, it asks one of the 26 root operators for IP address of the operator responsible for the domain "facebook.com".
DNS Process - Step 3
Your local operator then contacts the operator responsible for the facebook.com domain and asks it for the IP address for the name "facebook.com".

DNS Process - Step 5
That operator then gives your operator the corresponding IP address.
DNS Process - Step 6

Your operator then gives that IP address to your computer.

DNS Process - Step 7

At that point, your computer can make a connection to the right one computer out of the millions.

DNS Process - Step 8

Although this description slightly simplifies the DNS, this basic process happens every time you visit a website, send email, or upload pictures or videos. The DNS system is used billions of times per day and is absolutely essential to the Internet as we know it today.

A mistake in the DNS entries for your site or email can cause serious downtime and connection issues for your website visitors and people sending you email. That's one reason why it's important to use a technically astute resource like Intersites to manage your domain names and your DNS servers.

Posted in Help Me Understand

Blog RSS Suite / 131

Blog Categories


Intercom - Subscribe Now

Facebook Twitter Linked In