How Does DNS Work?
You’ve surely come across DNS in your digital adventures. Whether when setting up a website or choosing a web hosting company, facing a DNS_PROBE_FINISHED_NXDOMAIN error, or simply trying to change your DNS settings to improve your online experience, this term seems to be everywhere.
And not for nothing. DNS, which stands for the Domain Name System, is a principal online protocol, or service, without which the internet – as we know it today – couldn’t function. The Domain Name System is a vital part of the exchange of data over the World Wide Web, and it’s key to the user-friendly experience of browsing online.
In a nutshell, the Domain Name System translates the alphabetic domain names and URL addresses into IP addresses, the actual number-based addresses where a website and its data are located. It’s the link between human language and computer language.
But let’s flesh things out a bit more today.
In this article, we’ll take a deep dive into all things DNS without making this interesting subject seem impossibly complex. To get the full picture of the meaning of DNS, we’ll go into the details of:
- What the Domain Name System is, and its significance today.
- A bit of history about the origin of the Domain Name System.
- How the Domain Name System works.
What is DNS?
The global Domain Name System is managed by the non-profit organization Internet Corporation for Assigned Names and Numbers. DNS (short for Domain Name System) is an internet server (or rather, network of servers) which translates a website’s domain name into its IP address. This is where the whole “DNS translates human language into computer language” enters the picture. Domain names are alphabetic and easy to use, remember, and recognize for humans. But in computer language, the Internet is actually based on IP addresses.
An IP address, or an Internet Protocol Address, is a unique, number-based address that computing devices (including servers, computers, smartphones, and tablets) connected to the Internet use to identify themselves. Each computing device has a unique IP address. On the World Wide Web network, the greatest global internet network, all computing devices are connected via IP addresses. In terms of our everyday, physical world, think of an IP address as a number or a home address.
The same goes for websites. Websites are hosted on servers, so their IP address is based on that server. The DNS system, which is a network of its own, translates a certain domain name into an IP address so you can reach the website you desire. If one DNS server doesn’t recognize the domain you’re looking for, it will ask other servers on the DNS network, until it finds and retrieves the correct IP address so that you can access a website.
You see, there’s a lot going on behind the scenes for a single website to load on your browser!
But let’s look at an example to make this more clear. To visit Google, for instance, you just type in google.com into your browser’s address bar. It’s quite easy! But in fact, one of Google’s IP addresses (it has quite a broad and versatile range of IP addresses) is 126.96.36.199. If it weren’t for the DNS, you would have to write that in order to reach Google.
And the same would be true for any other website – whenever you wanted to visit any website, you’d have to find or memorize its IP address. It would be impossibly difficult and time consuming.
That’s why the global success of the internet and its widespread use today is often attributed to the development of the Domain Name System.
And on that note, let’s take a quick look at the history of DNS and how it came about.
Where Does DNS Come From?
The Internet was built on the shoulders of numerous early visionaries and programmers. But since we’re more focused on the how rather than the when and where in this article devoted to DNS, our historical detour will be brief.
The Internet as we know it today – the “network of networks”, came about in 1983. That year, on January 1st, the experimental computer network ARPANET began assembling the multiple previously-existing networks into a single unifying network.
The same fateful year, Paul Mockapetris invented the Domain Name System. Mockapetris realized that the issue with ARPANET’s early version of the Internet was that it held the name-to-address translations in single tabs on single hosts. Basically, there was a single, centazlied HOSTS.TXT file which held the mapping data of all existing sites. As the number of websites grew, so did this file, which was another issue. Additionally, for people to visit websites, they’d have to know their individual IP addresses.
To make the internet more broadly available to the public, Mockapetris and his team decided to come up with a user-friendly way to connect websites to their IP addresses. They also aimed at creating a decentralized model, as not all data could be maintained in a single file. The result was today’s DNS: a naming system which is more broadly distributed and dynamic.
Instead of having to look up host names, Mochapteris essentially built a system that connected easily identifiable names (alphabetic domain names, human-friendly) to numeric IP address (computer-friendly). Once the Internet Engineering Task Force (IETF) was formally created in 1986, DNS was officially made of the original Internet Standards.
The Domain Name System, combined with Tim Berner-Lee’s creation of the World Wide Web (the largest collection of hyperlinks accessible online), made the online world available and alluring to the general public.
Note: Many people confuse the Internet with the World Wide Web, but the WWW is actually just the biggest collection and interconnectivity of hyperlinks you can access online.
How Does DNS Work?
Finally, we get to the fun part, the nuts and bolts, the inside mechanism, the how of the matter. You probably already realized that in those few seconds that it takes for a website to load, DNS protocols are at work.
All you do is type in a domain name and hit enter. But what happens during the DNS lookup?
As we mentioned, DNS takes the domain name you entered into the IP address that’s actually recognized by the computing device. But what are the steps that occur during DNS resolution?
To understand the process of a DNS lookup, we need to first understand the hardware that supports the DNS system. Every time a website loads, 4 pieces of hardware, or 4 DNS servers are at work. Let’s look at what these servers are and what each of them does.
- DNS recursor: The DNS server that receives the query (request) from a client machine (computing device) through apps like internet browsers. To retrieve the client’s DNS query, the DNS recursor makes additional requests. Think of it as the librarian.
- Root nameserver: The DNS root server begins the translation process from human-friendly host name (domain name) into the computer-friendly IP address. Think of it as a library index card that points you to specific book racks – but you need more information to get the exact book.
- TLD nameserver: The TLD server (top-level domain server) is the next stage of finding the exact IP address. It focuses on hosting the domain name extension (like .com or .org). Think of it as the specific book shelf where the desired book is.
- Authoritative nameserver: The last DNS server, the authoritative nameserver, has access to the exact, requested record. It retrieves the IP address that matches the original hostname and sends it to the DNS recourse, the initial server that made the original query.
Now, the steps that go into a DNS lookup:
- Internet user types domain name/URL address (like google.com) into browser search bar. Query is received by a DNS recursor resolver.
- The resolver passes the query with the added information to the DNS root nameserver.
- The DNS root nameserver gives the address of a TLD nameserver, which has the data for the domain extensions.
- The resolver makes a request to the appropriate domain extension TLD, like .com or .net.
- The TLD server retrieves the IP address of the domain’s nameserver.
- The recursive resolver then sends the query to the domain’s nameserver.
- The IP address is retrieved from the nameserver, and sent to the resolver.
- The DNS resolver provides the IP addresses of the domain which was initially requested to the web browser.
- At this point, the browser makes a HTTP request to the IP address to access the desired webpage.
- The IP address’ server retrieves the webpage in a format which can be loaded in the browser.
And that’s it! There’s quite a bit to the process, but once it’s broken down it’s simple enough to understand. Now you know what goes on every time you try to visit a website.
View Related Articles
There are many DNS record types, and they vary from being absolutely essential, to simply being quite useful. Two of the most commonly used DNS records are A records and CNAME records. Let’s take a closer look at what each of these DNS records is and what their functions are, so as to better understand what the difference between a CNAME and an A record is.
The first step of creating a website is buying a domain name. This in itself is a daunting task – finding an available domain isn’t always easy. Plus, you have to come up with the best name to represent your brand. Of course, if you already have a business, coming up with a name is…
The .LLC domain is meant to be used by Limited Liability Companies, or LLCs. This will allow your company to have its full name right there in the domain, with the LLC standing after the dot. It reduces the hassle of adding a .com after the LLC bit, keeping your online identity clear to potential customers.