All about DNS Resolution

Mohammed owaisMohammed owais
4 min read

How Does Your Browser Find Anything Online?

Think about your phone's contact list. You don't dial your friend's 10 digit number, you just tap their name. It's simple, intuitive, and human. In the background, your phone does the work of connecting that name to the right number.

The internet works on a similar principle called the Domain Name System (DNS). It’s the internet's massive address book, and it's the reason you can navigate the digital world with ease.


Domains for Humans, IPs for Machines

Every single website, server, and online service has a numerical address called an IP (Internet Protocol) address. It's a unique identifier that looks something like this:

  • IPv4: 172.217.167.78

  • IPv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

Computers love these numbers, they're precise and easy to process. But for us? Not so much. Imagine trying to memorize a new IP address for every site you visit. That's why we have domain names like google.com.

DNS is the essential translator that bridges this gap. It takes the human friendly name you type and converts it into the computer friendly IP address, making billions of these connections every single day in the blink of an eye.

Seeing the Connection Yourself

Every domain name ultimately points to an IP address. You can prove this to yourself with a simple ping command in your computer's terminal or command prompt.

ping google.com

Watch as your computer instantly resolves the name to an IP address and starts communicating. That's the first step of the DNS in action.


From Your Keyboard to the Server:

When you type www.google.com and hit Enter, you kick off a lightning fast, global relay race. Here's how it happens in action:

  1. The First Question: Your browser doesn't know the IP, so its first stop is a recursive DNS resolver. Think of this as a helpful librarian who is tasked with finding the answer for you. This service is often run by your Internet Service Provider (ISP).

  2. Checking the Index: The librarian (resolver) first goes to one of the internet's 13 root servers. These servers are like the main index in a library; they don't contain the book itself, but they know which section to look in. They'll point the resolver toward the server managing the Top-Level Domain (TLD), in this case, .com.

  3. Finding the Right Aisle: Next, the resolver contacts the TLD name server for .com. This server manages all domains ending in .com and knows exactly which authoritative name server (the specific book on the shelf) holds the records for google.com.

  4. The Final Answer: The authoritative name server for google.com gives the definitive answer: "Here is the IP address." This address is passed all the way back to your browser, which can now make a direct connection to the website's server. This entire process is then cached (remembered) so the next time you visit, your computer already knows the way.


Why go through all these steps? Why not have one giant, central database for the entire internet? Because that would be a catastrophe waiting to happen. A single point of failure would be slow, prone to crashing, and a massive security risk.

Instead, DNS is decentralized. This distributed network ensures:

  • Endless Growth: The system can scale infinitely as the internet expands.

  • Incredible Resilience: If one server has a problem, the network simply works around it.

  • Blazing Speed: Caching and local servers mean most of your requests are answered from nearby, not from halfway across the world.


DNS Record Types

The "answer" from an authoritative server comes in different flavors called records. The most common ones include:

  • A Record: Maps a domain to an IPv4 address.

  • AAAA Record: Maps a domain to an IPv6 address.

  • CNAME Record: Forwards one domain to another (an alias or redirect).

  • MX Record: Directs a domain's email to the right mail server.


Now You Know the Secret

It's strange to think about, isn't it? Every time you browse a website, stream a show, or send an email, you're kicking off this invisible, globe spanning conversation. It all feels so seamless and instantaneous that we rarely stop to consider the complexity beneath the surface.

10
Subscribe to my newsletter

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

Written by

Mohammed owais
Mohammed owais