DNS Resolution Process

How the internet translates a human-readable domain name into an IP address.

Internet4 min readConcept 5 of 6

What is DNS?

The **Domain Name System (DNS)** is the phonebook of the internet.

When you type google.com into your browser, the browser has no idea where that is. It needs the underlying IP address (like 142.250.190.46). DNS is the exact step-by-step process of looking up that 'phone number'.

Why Developers Need It

Every time a user visits your app or your frontend calls an API, a DNS resolution occurs. This lookup takes time (latency).

If you misconfigure your domain's DNS records (like A records or CNAME records) when deploying your app, your website will literally disappear from the internet. Additionally, understanding DNS caching is critical when you move your app to a new server, as some users might still be directed to the old IP address for up to 48 hours.

The 4-Step Resolution Journey

DNS resolution is a relay race involving four different servers:

**1. The Recursive Resolver:** Your ISP's server. Your browser asks it for the IP. If it doesn't have it cached, it goes on a hunt.

**2. The Root Server:** The Resolver asks the Root Server, 'Hey, who knows about .com?' The Root points to the TLD server.

**3. The TLD Server:** The Resolver asks the .com server, 'Who knows about google.com?' The TLD points to the Authoritative Name Server.

**4. The Authoritative Name Server:** The Resolver asks it for the IP. This server actually holds the final 'A Record' (the IP address). The Resolver brings this IP back to your browser!

The DNS Relay Race

Click 'Resolve' to watch how your browser talks to the four different servers in real-time to find the IP address for google.com.

// Simplified DNS Lookup Logic async function resolveDNS(domain) { // 1. Check local cache (Browser/OS) if (cache.has(domain)) return cache.get(domain); // 2. Ask ISP's Recursive Resolver const resolver = new ISPResolver(); // 3. Resolver asks Root Server const tldServer = await resolver.askRoot(domain); // 4. Resolver asks TLD Server const authServer = await resolver.askTLD(tldServer, domain); // 5. Resolver asks Authoritative Server const ipAddress = await resolver.askAuth(authServer, domain); return ipAddress; // e.g. 142.250.190.46 }
🌱
Root
. (dot)
📚
TLD
.com
🔐
Auth
google.com
Resolver
ISP / 8.8.8.8
💻
Your Browser
Where is google.com?

Check yourself

Pick an answer to lock it in, then read why. Getting one wrong is part of how it sticks.

  1. 1What is the primary role of the Authoritative Name Server?
  2. 2Why might a user still see your old website after you updated your DNS to point to a new server IP?
  3. 3In the DNS lookup process, which server does the Recursive Resolver ask first?

Remember this

  • DNS is the phonebook of the internet, translating domains to IP addresses.
  • The lookup sequence: Browser -> Resolver -> Root -> TLD -> Authoritative.
  • DNS records are cached based on their TTL (Time To Live) to speed up future lookups.

Done with this concept?

Mark it complete to track your progress. No login needed.