DNS: The Way the Domain Name System Works

Have you heard of DNS? The Domain Name System is the unseen, often unsung hero of the internet. Many people have no idea of the processes that occur when they type a domain name into their web browsers, but without DNS the way we search the web would be radically different. 

What is DNS? And how does it work? Get ready to find out!

What Is DNS?

DNS stands for Domain Name System, and its main job is to translate domain names into IP addresses. 

A domain name is the unique name given to a website, such as google.com. This is used when typing a web address: www.google.com

An IP address is a string of numbers that’s used to identify all machines on the internet – including web pages. 

DNS is needed because humans use domains to navigate the internet, whereas our computers and web browsers use IP addresses. So we need something to translate our domain requests into an IP address that our computers can understand and find in order to load the correct web page. And that’s where DNS comes in. 

Without DNS, we would have to remember IP addresses for any website we wanted to visit. With over 300 million domains registered, it quickly becomes clear why DNS is so important! 

How Does DNS Work? 

DNS makes the internet a user-friendly, accessible place for everyone to use, and keeps things loading quickly and efficiently behind the scenes. But how does it actually work? 

To fully explain how DNS works, first you need to meet the four DNS servers that work together to fulfil DNS lookups. To give you an idea of each server’s role, we’ve labelled them as different members of an archive team – with a front desk, librarian, archive keeper, and translator: 

  1. Resolving name server: This is the first server in the lookup process. The resolving name server receives the request, and goes to each of the other servers searching for the correct IP address to give back to the web browser. 
  2. Root name server: The root name server is like a directory – it tells the resolving name server where to look. Most importantly, it can tell the resolving name server where to locate the correct TLD name server… 
  3. TLD name server: The Top Level Domain (TLD) name server stores information for each TLD – the ending part of the domain. So there’s a .com TLD name server, a .org server, .net server, and so on. If you’re looking for example.com, you’ll need a .com TLD name server. 
  4. Authoritative name server: This is the last server in the lookup process, and has information for the example.com part of the address. It can tell the resolving domain server the correct IP address to give back to the web browser. 

Now you know each DNS server and their roles, we can walk through each stage of a DNS query! 

First, someone has to search for a web page, typing www.example.com into their web browser. The web browser checks its cache (memory) to see if it has the correct IP address stored and ready to go. In this example, it doesn’t

The computer’s operating system doesn’t have the IP address stored in its cache either, so it asks the resolving name server for the IP address. This request is called a query, and kickstarts the DNS lookup process

The resolving name server first checks its own cache to see if it has the IP address, but it doesn’t. So, it goes to the root name server and makes a query: “Do you have the IP address for www.example.com?” 

The root name server doesn’t have the IP address, but it does know the right TLD name server that the resolving name server should go to. “You need the .com TLD name server over there!”

The resolving name server then goes to the .com TLD name server and repeats its query. “Do you have the IP address for www.example.com?”

The TLD name server doesn’t have the IP address either – but, it directs the resolving name server to the correct authoritative name server. “That one will have what you’re looking for!”

The resolving name server goes to the authoritative name server and repeats its query. This time, it gets a new answer: “Yes, I have the IP address for www.example.com! It’s 123.456.7.7.”

Success!

The resolving name server puts this information in its cache and takes it back to the original computer’s operating system. The IP address gets passed back to the web browser, which connects to the correct web page. 

The incredible thing is, this whole (pretty complex) process takes less time than the blink of an eye!

Wrap-Up

DNS is an essential but unseen part of the internet. It’s a speedy and efficient system that makes the web a much more accessible place. Without it, how we search the internet would be difficult, lengthy, and tiresome. The four DNS servers work together to translate human-friendly domains into computer-friendly IP addresses, so we can sit back and relax while they do all the hard work!

error: Content is protected !!