What is DNS and How does it Work?

In the world of networking, computers don’t go by names like humans do. They go by numbers. Because that’s how computers and other similar devices talk and identify with each other over a network.. Which is by using numbers such as IP addresses. Humans on the other hand are accustomed to using names instead of numbers, whether is talking directly to another person or identifying a country, place, or thing. Humans identify with names instead of numbers. So in order to bridge the communication gap between computers and humans and make communication a lot easier, networking engineers developed DNS, and DNS stands for a domain name system.

How DNS works?

DNS resolves names to numbers, to be more specific it resolves domain names to IP addresses. So if you type in a web address in your web browser, DNS will resolve the name to a number. Because the only thing computers know are numbers.

So for example, if you wanted to go to a certain website you would open up your web browser and type in the domain name of that website. Let’s use yahoo.com. Now technically you really don’t have to type in yahoo.com to retrieve the Yahoo web page. You can just type in the IP address instead if you already knew what the IP address was. But since we are not accustomed to memorizing and dealing with numbers. Especially when there are millions of websites on the internet. We can just type in the domain name instead and let DNS convert it to an IP address for us.

So back to our example, when you type in yahoo.com, your web browser with the DNS server search through its database to find a matching IP address for that domain name, and when it finds it it will resolve that domain name to the IP address of the Yahoo web site. And once that is done, then your computer is able to communicate with a Yahoo web server and retrieve the webpage.

So DNS basically works like a phone book. When you want to find a number, you don’t look up the number first. You look up the name first, then it will give you the number.

Let’s Examine the Steps That DNS takes.

what is dns

So to break this down into further details and let’s examine the steps that DNS takes. When you type in yahoo.com in your web browser and if your web browser or operating system can’t find the IP address in its own cache memory, it will send the query to the next level to what is called the resolver server (also known as a DNS recursor). The resolver server is basically your ISP or Internet service provider. So when the resolver receives the query, it will check its own cache memory to find an IP address for yahoo.com, and if it can’t find it it will send the query to the next level which is the root server.

Root Server

When the root server receives the query for the IP address for yahoo.com, the root server is not going to know what the IP address is. But the root server does know where to send the resolver to help it find the IP address. So the root server will direct the resolver to the TLD or top-level domain server for the .com domain.

The root servers are the top of the root of a DNS hierarchy. There are 13 sets of these root servers and they are strategically placed around the world. They are operated by 12 different organizations and each set of these root servers has its own unique IP address.

Then the resolver will now ask the TLD server for the IP address for yahoo.com. The top-level domain server stores the address information for top-level domains, such as .com, .net, .org, and so on. This particular TLD server manages the dot-com domain which yahoo.com is a part of. So when a TLD server receives the query for the IP address for yahoo.com, the TLD server is not going to know the IP addresses for yahoo.com.

The TLD will direct the resolver to the next and final level, which are the authoritative name servers. So once again the resolver will now ask the authoritative name server for the IP address for yahoo.com.

The authoritative name server or servers are responsible for knowing everything about the domain which includes the IP address. They are the final authority. So when the authoritative name server receives the query from the resolver, the name server will respond with the IP address for yahoo.com. And finally, the resolver will tell your computer the IP address for yahoo.com. Then your computer can now retrieve the Yahoo web page.

It’s important to note that once the resolver receives the IP address, it will store it in its cache memory in case it receives another query for yahoo.com. So it doesn’t have to go through all those steps again.


In this article, you learn how DNS work and also step by step breaf explanation about rool of resolver server, root server, TLD or top-level domain server and authoritative name servers. If you have any questions about this, please comment below. Thank you.


More from this stream