How DNS Works: The Internet’s Hidden Address Book Explained Simply

Jay TilluJay Tillu
5 min read

Ever wondered how you magically land on your favorite website—like google.com—just by typing a name into your browser? Behind the scenes, a powerful but invisible system called DNS (Domain Name System) is working hard to connect you to the right place on the internet.

Let’s take a journey and see how DNS works, step by step, in the simplest way possible.


🧠 What is DNS and Why Do We Need It?

Think of DNS like the internet’s phonebook. You know your friend's name, but your phone needs their number to call them. The same goes for websites—you type in a name like www.google.com, but your computer needs its IP address (like 192.0.2.1) to actually connect.

DNS translates domain names into IP addresses, so your browser knows exactly where to go.


🔍 Step-by-Step Journey of a DNS Lookup

Let’s break down the path your request follows when you type www.google.com into your browser.


1. 🌐 Your Device Checks Its Local DNS Cache

Before asking anyone else, your computer first checks:
“Have I visited this site recently?”
If yes, it may already know the IP address from a previous visit and use that directly.

This stored info is kept temporarily and is controlled by something called TTL (Time To Live). TTL decides how long the information is saved in the cache before it's considered outdated.

📝 If found in cache? ✅ Done!
📝 If not found? ⏭️ Keep going...


2. 🧭 Ask the Local DNS Resolver (Usually from Your ISP)

If your local cache doesn’t know the answer, your computer asks a DNS resolver (also called a recursive resolver).

📌 What is a resolver?
It’s a server provided by your Internet Service Provider (ISP) (like Jio, Airtel, Comcast), or it could be a public one like Google DNS (8.8.8.8) or Cloudflare (1.1.1.1).

This resolver is like your smart assistant. If it doesn’t know the answer, it asks around on your behalf—following the next steps.


3. 🗺️ The Root DNS Server — The Starting Point

The resolver’s first stop is the Root DNS Server.

🌍 There are 13 main root server IP addresses, but each one is backed by hundreds of actual servers spread across the world. These use a technology called Anycast, which routes your DNS request to the nearest or fastest server, making the system faster and more reliable. The root servers are managed by different organizations, including ICANN, Verisign, NASA, and others.

The Root Servers don’t know the exact IP, but they can identify which Top-Level Domain (TLD) server to ask next.

For example:

  • If you're looking for google.com, the root says:

    “Ask the .com TLD server.”

Root servers are like a university’s main office telling you:

“For Science Fiction, go to the Science Department.”


4. 🏷️ TLD DNS Server — Finding the Right Domain Group

TLD stands for Top-Level Domain—like .com, .org, .ai, etc. Each TLD has its own DNS servers, operated by different registries.

🔍 The TLD server doesn’t know the final IP either. But it does know who’s in charge of that specific domain (like google.com).

It tells the resolver:

“Go ask ns1.googledns.net—that’s the authoritative name server for google.com.”

🧠 So What Does the TLD Server Store?

Mainly NS (Name Server) records for domains under its control.


5. 🏠 SLD DNS Server — The Final Answer

Now the resolver talks to the SLD DNS Server, which is configured by the domain owner (like Google).

✅ This server has the actual IP address of the domain.

So it finally says:

“Yes, www.google.com is at 192.0.2.1.”

This is the answer the browser needs!


6. 📦 Cache It and Load the Website

Before returning the IP, the resolver:

  • Caches the result (stores it for later use) for as long as the TTL allows.

  • Then returns the IP to your browser.

  • Your browser uses this IP to contact the server and load the site.

💡 The next time you visit the same website, it will load faster because the IP is already cached.


🔁 Recap: Full DNS Lookup Flow

Let’s summarize the full path of a DNS lookup:

  1. Browser asks your OS for the domain IP.

  2. OS checks its local cache.

  3. If not found, it sends the query to the DNS resolver.

  4. Resolver checks its cache.

  5. If still not found:

    • Ask Root Server → “Where’s .com?”

    • Root → “Ask the .com TLD Server”

    • TLD Server → “Ask ns1.googledns.net for google.com

    • SLD Server → “Here’s the IP: 192.0.2.1

  6. Resolver returns IP to your browser.

  7. Browser connects, and the site loads.


🎓 Final Thoughts: DNS Is the Unsung Hero of the Web

Without DNS, we’d have to memorize IP addresses for every website we use—yikes!

Thanks to its smart, layered design using Resolvers, Root, TLD, and SLD servers, DNS keeps the internet fast, efficient, and easy to use for everyone.

Learn more about Compliance

Follow me for more such content

0
Subscribe to my newsletter

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

Written by

Jay Tillu
Jay Tillu

Hello! I'm Jay Tillu, an Information Security Engineer at Simple2Call. I have expertise in security frameworks and compliance, including NIST, ISO 27001, and ISO 27701. My specialities include Vulnerability Management, Threat Analysis, and Incident Response. I have also earned certifications in Google Cybersecurity and Microsoft Azure. I’m always eager to connect and discuss cybersecurity—let's get in touch!