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

Aman SrivastavAman Srivastav
2 min read

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 TypePurpose
AMaps a domain to an IPv4 address
AAAAMaps a domain to an IPv6 address
CNAMEAlias for another domain (e.g., www → main domain)
MXMail exchange — tells email servers where to deliver mail
TXTStores text data — often used for email verification (like SPF, DKIM)
NSLists nameservers for the domain
SOAStart of Authority — holds info about the DNS zone
SRVDefines location (hostname + port) for services
PTRReverse 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:

  1. Browser checks local DNS cache.

  2. If not found, it asks the recursive resolver.

  3. Resolver asks the Root Server.

  4. Root points to .com TLD Server.

  5. TLD Server points to Authoritative Server for example.com.

  6. Authoritative Server replies with the IP address.

  7. Browser uses this IP to open the website.

0
Subscribe to my newsletter

Read articles from Aman Srivastav directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Aman Srivastav
Aman Srivastav