You type google.com in your browser. Your computer has no idea where that is. It needs an IP address. Hereโs how it finds one in about 20 milliseconds.
Step 1: Browser cache
Your browser checks its own DNS cache first. If you visited google.com in the last few minutes, the IP is already cached. Done in microseconds.
Chrome: chrome://net-internals/#dns
Firefox: about:networking#dns
Step 2: OS cache
If the browser doesnโt have it, it asks the operating system. Your OS maintains its own DNS cache.
# macOS: see cached entries
sudo dscacheutil -cachedump
# Windows:
ipconfig /displaydns
# Linux:
systemd-resolve --statistics
Step 3: Router cache
If the OS doesnโt have it, the query goes to your router (usually 192.168.1.1). Most routers cache DNS responses too.
Step 4: ISPโs recursive resolver
If nobody in your local chain has the answer, the query goes to your ISPโs DNS resolver (or whatever you configured โ 8.8.8.8 for Google, 1.1.1.1 for Cloudflare).
This is where the real work happens. The recursive resolverโs job is to find the answer by asking a chain of authoritative servers.
Step 5: Root nameservers
The resolver asks one of the 13 root nameserver clusters: โWhere is google.com?โ
The root server doesnโt know google.comโs IP. But it knows whoโs responsible for .com domains:
Response: โI donโt know, but ask the .com TLD servers at these addresses.โ
Step 6: TLD nameservers
The resolver asks the .com TLD (Top-Level Domain) server: โWhere is google.com?โ
The TLD server doesnโt know the IP either. But it knows which nameservers are authoritative for google.com:
Response: โI donโt know, but google.comโs nameservers are ns1.google.com at 216.239.32.10.โ
Step 7: Authoritative nameserver
The resolver asks Googleโs nameserver: โWhatโs the IP for google.com?โ
Response: โ142.250.80.46. TTL: 300 seconds.โ
Finally, an actual answer.
Step 8: Response chain
The answer flows back:
- Googleโs nameserver โ recursive resolver
- Recursive resolver caches it (for 300 seconds, per the TTL)
- Recursive resolver โ your OS
- OS caches it โ your browser
- Browser caches it โ makes the HTTP connection to 142.250.80.46
The full journey
Browser cache โ miss
OS cache โ miss
Router cache โ miss
ISP resolver โ miss
โโโ Ask root server: "where is .com?" โ TLD addresses
โโโ Ask .com TLD: "where is google.com?" โ NS addresses
โโโ Ask google NS: "IP for google.com?" โ 142.250.80.46
Response cached at every level
Browser connects to 142.250.80.46
Total time: 20-100ms for a cold lookup. <1ms for a cached one.
Why TTL matters
TTL (Time To Live) tells caches how long to keep the answer. Google uses 300 seconds (5 minutes). If youโre migrating servers and change your DNS, it can take up to the TTL for everyone to see the new IP.
โIt takes 24-48 hours for DNS to propagateโ is mostly a myth. It takes as long as the old TTL. If your TTL was 86400 (24 hours), then yes, it takes up to 24 hours. If it was 300, it takes 5 minutes.
Pro tip: lower your TTL to 60 seconds a day before a migration, then change the IP. Propagation in minutes, not hours.
DNS record types
- A: Domain โ IPv4 address (
google.com โ 142.250.80.46) - AAAA: Domain โ IPv6 address
- CNAME: Domain โ another domain (
www.google.com โ google.com) - MX: Domain โ mail server (
google.com โ smtp.google.com) - TXT: Arbitrary text (used for email verification, SSL validation)
- NS: Domain โ nameserver
The one-sentence summary
DNS is a hierarchical lookup: your browser asks your OS, which asks your router, which asks your ISP, which asks root โ TLD โ authoritative nameservers, and the answer gets cached at every level on the way back.
Related: What is DNS? ยท DNS Resolution Failed โ fix ยท How HTTPS Keeps Your Data Safe