DNS Resolution Process
How the internet translates a human-readable domain name into an IP address.
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.
Check yourself
Pick an answer to lock it in, then read why. Getting one wrong is part of how it sticks.
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.