🌐 What is DNS? A Beginner’s Guide to the Internet’s Phonebook

What is DNS?
DNS (Domain Name System) is like the phonebook of the internet. It translates human-friendly domain names (like facebook.com
) into machine-readable IP addresses (like 157.240.22.35
), so that browsers can load internet resources.
Why is DNS Important?
Without DNS, you'd have to remember IP addresses like 142.250.72.206
to access Google — not fun, right?
Here’s why DNS is crucial:
🔎 Easier Navigation: You type a name, not a number.
⚡ Faster Website Access: DNS caching speeds up loading.
📈 Scalability: Websites can change IPs without changing names.
🔐 Security: DNS records can support secure setups (e.g., DNSSEC, SPF for email)
Record Type | Purpose |
A | Maps a domain to an IPv4 address |
AAAA | Maps a domain to an IPv6 address |
CNAME | Alias for another domain (e.g., www → main domain) |
MX | Mail exchange — tells email servers where to deliver mail |
TXT | Stores text data — often used for email verification (like SPF, DKIM) |
NS | Lists nameservers for the domain |
SOA | Start of Authority — holds info about the DNS zone |
SRV | Defines location (hostname + port) for services |
PTR | Reverse lookup — IP to domain (used in reverse DNS) |
DNS Hierarchy Explained: From Root to Authoritative Servers
1. Root DNS Server
The top of the DNS hierarchy.
Handles queries for Top-Level Domains (TLDs).
Example: Knows
.com
,.org
,.in
, etc.
2. TLD (Top-Level Domain) Server
Manages a specific TLD (like
.com
).Points to Authoritative Name Servers for the domain.
3. Authoritative DNS Server
Final authority — it knows the exact IP address of the domain.
Responds with the IP address for the requested domain.
Example: How DNS Lookup Works
Let’s say you type www.example.com
in your browser:
Browser checks local DNS cache.
If not found, it asks the recursive resolver.
Resolver asks the Root Server.
Root points to
.com
TLD Server.TLD Server points to Authoritative Server for
example.com
.Authoritative Server replies with the IP address.
Browser uses this IP to open the website.
Subscribe to my newsletter
Read articles from Aman Srivastav directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
