For those who haven’t learned about the internet, it likely seems incomprehensible. Out of the nearly 4 million Internet users across the globe, most of them don’t know the basic principles of searching for a webpage and receiving the results for that search.
How can you search for a website and within seconds, if not milliseconds, already have a complex website loaded? The inner workings of the internet may seem magical to some, but the entire system operates smoothly thanks to various key technologies. One of these key pieces of your day-to-day internet use is the DNS—domain name system.
The DNS acts as an intermediary between you and the grandiose library of domain names and their associated IP addresses. An IP address—internet protocol address—is a number that corresponds to each device that accesses the internet. Your laptop, phone, desktop, and smart TV all have their own IP addresses.
In essence, the DNS acts as a phone book that holds all the URLs—which we can relate to names in a phone book—and their IP addresses—the phone number corresponding to each name.
Table of Contents
The History of DNS
Back in 1966, the ARPANET project began with the goal of allowing computers to remotely access other computers. During the project, Elizabeth Feinler developed and maintained a directory that would create names to take the place of IP addresses for ease of access.
The beginning stages required manual assigning of names to addresses, and team members developed the idea of using endings like “.edu” for computers that were located at educational institutions.
Eventually, it became too slow and difficult to maintain a centralized repository of domain names and IP addresses. Paul Mockapetris was hired to review various proposals and look for a compromised solution to the problem. In the end, Paul created his own solution that he dubbed the Domain Name System in 1983.
Since 1983, there have been various improvements, revisions, and proposed extensions to the core DNS technology.
Basic DNS Function
As described, the DNS is the internet’s phonebook. Anybody can type in a URL—or an email into their email service provider— to their browser and receive exactly what they’re looking for. However, the DNS is more complex than a phonebook when it’s used in distributed internet service practices.
Traditionally, companies would build all their servers—something anyone can do—to store their data. Today, things are different. Many companies store their information over an array of servers—that may or may not be theirs— in numerous geographical locations.
For example, people who run blogs or own eCommerce stores likely pay for web hosting services where a company maintains all of the website’s data. And based on these geographical locations, companies may distribute different information. This is where the DNS comes in.
When you access the internet, the DNS knows your physical location, and it will direct you to a server that is closest to you physically speaking; typically, this is to ensure you receive the fastest services possible. As your internet search query is performed on a server near you, you will receive information back from that server.
Seeing that servers will serve the information that they have, you can see how this may be used. Two servers in two different geographical locations may contain different data for the same website.
For example, two people querying for Netflix will not receive the same information if one is in Australia and the other in the United States. Each of these users will have their requests routed to a server near them which will respond with different information.
This is done on purpose by Netflix and several other companies, but not all websites will distribute different information based on the geographical location.
Deep Dive into DNS
Whenever you want to receive or send information across the internet, you have to know where to send or ask. You’ve already learned that DNS takes care of that by turning a hostname into an IP address, but how does it do it?
There is no single repository full of domain names and IP addresses. Rather, that information is stored across a network of DNS servers found all over the globe.
Once you request your web browser, your computer has done all the work it needs to do—the rest is left to the DNS. And how the DNS does that comes down to the various types of DNS servers and their functions.
Types of DNS Servers
These are the most common types of DNS servers. Certain types we mentioned are something that you probably use every day.
A type of resolver and a server that is the first piece of the puzzle in the DNS system of functions. The recursor receives and handles requests from the browser. Whenever you make a query through your browser by searching for a URL or trying to send an email to someone, that domain name or email address is sent to the recursor.
From there, the recursor will make additional requests to continue the process of finding the required information.
The server that initiates the process of changing a domain name or email address for an IP address. The root nameserver receives requests from the recursor and continues the chain by sending further queries. Essentially the root nameserver will give a location as to where the IP address of that domain is, but it won’t complete the translation.
This server, the top-level domain server, takes the request from the nameserver to further narrow down the search. The TLD nameserver is responsible for holding and finding the last part of a URL such as “.com”, “.gov”, or “.edu”.
The last server in the puzzle is responsible for completing the translation of domain name into IP address. This is the server that is ultimately responsible for DNS records. Once the authoritative nameserver completes the request, it will send the IP address back to the recursor where the query was started.
DNS Lookup Steps
The process of finding a URL’s IP address is straightforward as long as there are no errors. There are 8 main steps in the process and all of them are based on the different servers’ functions.
- ☑️ A user types in a URL such as “google.com” or “youtube.com” into their browser, and the browser sends the request off to the DNS recursor—this is called a query.
- ☑️ The DNS recursor receives the query and sends a further query to the DNS root nameserver asking for further information about where the URL’s IP address is stored.
- ☑️ The root nameserver answers the query by sending the address of a TLD server. This is where the query takes into account the ending of a domain—be it “.com'' or “.net”.
- ☑️ The resolver sends a query to the correct TLD server based on the received message from the root nameserver.
- ☑️ The TLD server continues the process by finding the IP address of the domain’s nameserver. This is not the IP address of the domain itself, but the address of the server where the domain’s address is stored.
- ☑️ The resolver sends a query to the domain’s nameserver for the IP address of whatever URL was searched.
- ☑️ The resolver receives the IP address from the nameserver.
- ☑️ Lastly, the resolver responds to the web browser with the IP address associated with the URL.
Types of DNS Queries
Here are the three ways that DNS server gets its information.
A query occurs when the client—a browser—asks the DNS server to find information like an IP address and respond to the browser with it. The DNS server can respond successfully with the IP address, or it can respond with an error message if no results were found.
A query that happens when a client searches for the desired information in a DNS server because the information is already stored in the cache there. Additionally, this can happen when the DNS resolver is authoritative—when it’s the last server in the lookup process, and it knows where the required information is.
A query that doesn’t require an absolute true or false value. That’s to say that the browser or DNS client tells the DNS server that if there are no found results for the query, the server can provide a sort of referral to another server for a lower level, more specific domain namespace.
Caching is a useful practice that many browsers, routers, and even Internet Service Providers take advantage of. When you visit a site frequently, your browser and DNS recognize the URL, and that information is then stored on your computer.
Rather than performing a DNS lookup every time you want to visit a frequently used site, your computer will already have the data necessary to serve the webpage without having to access DNS servers.
The Bottom Line
Domain name system is a system used daily by virtually everybody who has access to the internet. The invention of DNS helped facilitate the everyday usage of internet browsers.
Without the DNS, people would have to remember the IP addresses of their favorite websites. Furthermore, without the DNS, platforms couldn’t serve different iterations of their websites to different people based on their physical location.