Table of contents
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:
The browser asks the DNS system: "What's the IP address of this website?"
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:
When you type a domain name (like
www.google.com
) in your browser, your computer doesn't know the IP address.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 .
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! ๐