How DNS Hierarchy Works: Exploring Root to Resolution

How DNS Hierarchy Works: Exploring Root to Resolution

ยท

5 min read

Have you ever thought ? what happens when you enter a query in that search bar ,Most of us donโ€™t! But behind the scenes, a whole lot happens in the blink of an eyeโ€”within just milliseconds. โšก From your request to the response, thereโ€™s are lots of process at work, ensuring you get what youโ€™re looking for.

In this article you will understood how important the role of DNS is in the world of internet and will go in depth of its hierarchical architecture

What is the need of DNS?

Before diving into what DNS (Domain Name System) is and how it works, letโ€™s first understand why we need it.

DNS is essentially the internetโ€™s address book ๐Ÿ“–. Just like your phoneโ€™s contact list, where every contact has a name linked to a number, DNS maps complex IP addresses to domain names that are easier to read, write, and remember.

1. Easier Access to Websites ๐Ÿ–ฅ๏ธ

Instead of remembering complex IP addresses (like 192.168.1.1), you can simply type user-friendly domain names like www.google.com.

2. Seamless Communication ๐ŸŒ

DNS translates human-readable domain names into machine-readable IP addresses so devices can locate and connect to websites or services.

3. Scalability ๐Ÿ“ˆ

With millions of websites and services online, DNS helps efficiently manage the vast network by distributing queries across multiple servers, donโ€™t worry about this point will go in detail how it works

Types of Domain

There are various kinds of domains:

  • Generic Domains: .com(commercial), .edu(educational), .mil(military), .org(nonprofit organization), .net(similar to commercial) all these are generic domains.

  • Country Domain: .in (India) .us .uk

  • Inverse Domain: if we want to know what is the domain name of the website. IP to domain name mapping. So DNS can provide both the mapping for example to find the IP addresses of google.com then we have to type

nslookup www.google.com

Now lets understand how dns works as you have seen in the diagram when you request any url it first goes to the resolving nameserver

Resolving Nameserver

Resolving nameserver is a type of DNS server responsible for finding the IP address associated with a domain name on behalf of a client (like your computer or browser). It's an intermediary between your device and the DNS system.

Root Nameserver

Root nameserver is the top-most server in the DNS (Domain Name System) hierarchy. It is the first step in translating (resolving) a human-readable domain name (like www.youtube.com) into a machine-readable IP address.

There are 13 logical root nameservers available across the globe

To know more about this 13 root nameservers Visit https://www.iana.org/domains/root/servers

TLD Nameserver

TLD (Top-Level Domain) nameserver is a type of DNS server responsible for managing the second level in the DNS hierarchy. It handles requests for domain names that belong to a specific Top-Level Domain, such as .com, .org, .net, .edu, or country-specific TLDs like .in, .uk, or .jp.

ANS Nameserver

An authoritative nameserver is the final stop in the DNS resolution process. It holds the actual DNS records for a domain, such as its IP address. This server is responsible for responding to DNS queries with the definitive answer about the domain.

DNS Workflow (After this you will be a DNS Pro! ๐Ÿš€)

All the steps are self explanatory and also we have discussed this steps in details and i have explained the workflow step by step in this flowchart as well.

Now there some additonal DNS info you should know let dive into that

DNS Lookup ๐Ÿ“–

In most simpler terms dns lookup is like finding the number in the contact list

When you type a website name (like www.google.com) into your browser:

  1. The browser asks the DNS system: "What's the IP address of this website?"

  2. The DNS system responds with the IP address (e.g., 142.250.190.78), which tells your browser where to find the website.

DNS Resolver ๐ŸŒ

A DNS Resolver is like a guide that helps your computer find the IP address of a website you want to visit.

Here's how it works:

  1. When you type a domain name (like www.google.com) in your browser, your computer doesn't know the IP address.

  2. The DNS Resolver takes your request and starts the process of finding the IP address by contacting different DNS servers (like Root, TLD, and Authoritative servers). Refer the above flowchart you wil get better idea .

  3. Once it gets the IP address, the resolver sends it back to your browser so it can load the website. ๐Ÿš€

DNS Caching ๐Ÿ—‚๏ธ

When your browser visits a website (e.g., google.com), it needs to find the address (IP address) of that website. DNS caching stores this address temporarily on your computer or network. Next time you visit the same site, your browser uses the cached address instead of asking the DNS server again, making things faster! โšก๐Ÿš€

Conclusion

In short DNS provides unquie identification to ip address make it simpler for user to visit websites.๐ŸŒ Instead of remembering complex numbers, you just type the website name! It then follows a structured process to find the address from DNS servers through 3-4 steps. ๐Ÿงฉ As you've understood from the explanation above, DNS works like a pro behind the scenes to connect you to your favorite sites seamlessly.

I hope you've now mastered what DNS is all about! ๐Ÿ’ก Keep exploring more about it. If you liked my content, do give it a like โค๏ธ and share it with your friends! ๐Ÿš€

Connect with Me ๐Ÿ‘‡

Github

LinkedIn

ย