DNS, or Domain Name System, is the process of translating domain names into IP addresses. Let’s say you want to check your email at www.email.com. When you type the domain name in the address bar, DNS begins the process of translating what you’ve typed into an IP address, such as 192.168.1.1. It then redirects you to the proper domain.
This process is what makes the Internet interactive. Could you imagine having to memorize every IP address for every domain you wanted to visit? DNS does this for you then redirects you to the requested domain. This provides the seamless experience we’ve grown to love today.
In this primer on DNS, we will go through the steps in translating the domain name to an IP address. We will briefly go over caching and what it means, and wrap up with a tidy summary. When discussing the DNS process, it is important to note that it takes place very quickly.
How Does DNS Work?
The DNS process is also referred to as a DNS lookup. That’s because this process involves a chain of servers that work together to look up the domain name and coordinating IP address.
- Career Karma matches you with top tech bootcamps
- Get exclusive scholarships and prep courses
A lookup is comprised of four main steps. Let’s look at these steps:
- You (the user) type in a domain name (www.email.com). This sends a query to the first server in the DNS lookup. This server is known as the recursive resolver. A common analogy is to think of the recursive resolver server as a librarian. By sending your domain query, you are asking the librarian to find the IP address that is associated with the domain name.
- The recursive resolver queries the second server in the chain. This server is known as the Root Name Server. Although the root server is the second server in the chain, it is the first step in converting the domain name into the associated IP address. Sticking to our library analogy, the librarian looks to an index (root server) which points to a specific group of books.
- That group of books the root server points to is known as the top level domain server (TLD). Inside the TLD, or the group of books for our analogy, is where the last portion of the host name (.com, .net, .org, etc) is hosted. Now our librarian can go to the correct section of books we have requested.
- Now that our librarian is in the correct section (.com, .net, etc) of books, we can open a book and see what IP address is associated with the domain. This server is the authoritative nameserver. It is like a reference book that points to the IP address of the domain. It provides an authoritative list of domain and IP address associations for the recursive server (our librarian) to bring back to the browser.
This process happens when a browser fires a brand new query to the DNS process. If you’ve successfully visited a website before, then this process is cached in memory and on the server. Think of a DNS cache like a temporary database where this process is saved and can be referenced for a quicker lookup time.
Again, the initial DNS process is lightning fast. The four steps just described take fractions of a second to complete. When the process is cached, it takes less time, but the time saved is probably imperceptible to us humans.
A Brief History of DNS
Now that we’ve gone over the basics of a DNS lookup, let’s learn a little about why DNS was built in the first place. In the early days of the Internet, there wasn’t just one network that all computers connected to. Instead, it consisted of a system of networks.
This means that each network handled connectivity a bit differently. It became clear that a scalable solution was needed. In 1983, DNS was created by Paul Mockapetris.
Mockapetris’ solution was to allow users to use domain names. In creating this solution, a new challenge had to be addressed. How could this new system organize these domain names without unnecessary restrictions?
After many updates, the solution became what we now know as DNS. Through the process of a lookup as described above, users can connect to a universal network. By assigning domain names to IP addresses, interacting with the modern web is scalable and quick.
DNS (Domain Name System) is a process that translates a domain name into an IP address. Because of this, the DNS lookup allows users to type in a domain name into an address bar in a browser and land on the destination in an instant.
What happens behind the scenes is the recursive server passing the query down a translation chain of servers. This query goes through two other servers that further translate the query based on its suffix. Then we end up at the authoritative server which contains all of the records of domain name and IP address pairs.
From here, the IP address is returned to our recursive server and to the browser. This whole process happens within fractions of a second. You could probably navigate to 100 different domains before finishing reading about the process of getting to these domains!
About us: Career Karma is a platform designed to help job seekers find, research, and connect with job training programs to advance their careers. Learn about the CK publication.