What is DNS and why name resolution exists

We use browsers in our day-to-day life to search for websites, but we rarely think about how a browser loads a website in milliseconds. How does the browser know where a website is hosted?
What really happens behind the scenes when you type a URL?
In this blog, we’ll understand how a browser finds a website, what DNS is, and why DNS resolution exists. We’ll also look at why DNS is called a recursive system, step by step, in simple way.
Let’s begin.
What Is DNS and Why Do We Use It?
DNS stands for (Domain Name System) it is the heart of the browser. without DNS using the web would be extremely difficult.
Why DNS Exists
Computers do not understand domain names like
google.comComputers only understand IP addresses like
142.250.190.14
Human can’t remember the IP, So DNS acts as a translator between the Human-readable domain names to Machine-readable IP addresses
When you type a domain name into a browser, DNS answers this question:
“What is the IP address of this domain?”
Once the browser gets the IP address, it can connect to the server using HTTP or HTTPS and load the website.
Why DNS is called the Phonebook of the Internet
let’s understand it using an example:
Whenever you call someone, you type their name, but your phone understands the person's number. You save a number with a name in your phone.
The same thing happens with the internet; it only understands IP addresses. That's why DNS is used to find the IP of a domain; it acts as the internet's phonebook.
How Does DNS Resolution Happen?
Now the big question:
DNS does not store all IP addresses — so how does it find them?
DNS works in layers, using a process called DNS Resolution.
Step 1: Browser cache
When you enter a domain (e.g., google.com). The browser first checks: Have I visited this site before? If the IP is cached, the process stops here, browser directly render from here.
Step 2: Recursive DNS Server
If the IP not found in cached, then Browser goes to the Recursive DNS server.
It usually provided by:
ISP
Public DNS (Google, Cloudflare, etc.)
That’s why it’s called Recursive DNS because it keeps asking other servers until the IP is found.
The browser does not talk to root or TLD servers directly — the recursive DNS does this work.
Step 3: Root DNS Server
The recursive DNS server first contacts a Root DNS Server and asks:
“What is the IP address of
google.com?”
The root server replies:
“I don’t know the IP address”
“But I know where
.comdomains are managed”
It returns the Name Servers (NS) of the .com TLD.
Step 4: TLD (Top Level Domain) Server
Next, the recursive DNS server contacts the .com TLD server and asks:
“What is the IP address of
google.com?”
The TLD server replies:
“I don’t owner this domain”
“But here are the authoritative name servers for
google.com”
Step 5: Authoritative DNS Server
Finally, the recursive DNS server contacts the Authoritative DNS Server and asks:
“What is the IP address of
google.com?”
This server replies with the real DNS record, for example:
A record → 142.250.190.14
This server is the source of truth and stores all DNS records, such as:
A / AAAA records
NS records
MX records
TXT records
Step 6: Response to Browser
After finding the IP of the Domain (google.com) then Recursive DNS send back IP to the Browser
And Browser makes an HTTP/HTTPS request
Receives the response
Renders the webpage

So, this is the process of finding the IP address of a domain name. Now we understand the dig command.
What is dig?
Until now, we have seen how DNS resolution works internally.
But how can we inspect this process and see, how an IP address is actually found?
dig stands for (Domain Information Groper) allows you to:
Query DNS servers directly
See how a domain name is resolved
Inspect DNS records (A, NS, MX, TXT, etc.)
Understand the DNS hierarchy
Why Use dig?
When you type a domain name in a browser, DNS resolution happens silently in the background.dig reveals this hidden process and shows what each DNS server returns.
Example:
dig . NS
This command gives Root Name Servers (The Top of DNS)
dig . NS
What this command means
.represents the root zoneNSasks: “Who are the name servers for the root?”
You’ll get results like:
a.root-servers.net
b.root-servers.net
c.root-servers.net
...
dig com NS
This command gives TLD Name Servers (.com)
dig com NS
What this command means
com= Top-Level DomainNSasks: “Who manages the.com?”
You see the Output like:
a.gtld-servers.net
b.gtld-servers.net
c.gtld-servers.net
...
dig google.com NS
This command gives Authoritative Name Servers
dig google.com NS
What this command means
It asks: “Who is authoritative for google.com?”
You see the Output like:
ns1.google.com
ns2.google.com
ns3.google.com
ns4.google.com
dig google.com
This command gives only the final answer about the domain google.com. It basically returns the IP address (A / AAAA record), Query time, DNS server used and TTL
dig google.com
You see the Output like:

What NS records do and why they are important
NS (Name Server) records are one of the most important DNS records.
It is responsible for navigation inside the DNS system.
In simple words:
NS records tell DNS which server is responsible for a domain.
Without NS records, DNS resolution cannot move forward, and the IP address of a domain can never be found.
DNS resolution works like a chain.
At each level, DNS servers do not give the IP address directly they say:
“I am not the owner of that domain, but I know who is.”
That information is provided using NS records.
If NS records did not exist: Recursive DNS server does not know where to go next, DNS resolution would stop immediately. The browser would never get an IP address
So, DNS resolution would never start properly without NS records.
Conclusion
DNS is crucial because, without it, browsers can't find the IP address of a domain. Converting a domain name into an IP address, known as DNS resolution, involves multiple steps and layers to ensure users can access websites efficiently. The DNS system acts like the internet's phonebook, guiding browsers to the correct servers. Tools like dig help us inspect the DNS resolution process.
If you want to learn about DNS records, you can check out this blog: DNS Records: How Websites Are Found.