Roadmap › Networking & Hosting — How a Website Works, End to End › Module: Network Foundations
Lessons in this course (12)
3. DNS — how names become IP addresses
Basic★ Must knowLesson 3 of 12
text
Browser → OS resolver → Recursive resolver (ISP / 8.8.8.8 / 1.1.1.1)
→ Root server ("ask .com")
→ .com TLD server ("ask ns1.shop.com")
→ Authoritative server for shop.com → "www.shop.com = 20.43.10.5, TTL 300"
Answer cached at each level for TTL seconds| Record | Purpose | Example |
|---|---|---|
| A / AAAA | Name → IPv4 / IPv6 | www → 20.43.10.5 |
| CNAME | Alias to another name | www → shop.azurewebsites.net |
| MX | Mail servers | shop.com → mail.protection.outlook.com |
| TXT | Text — domain verification, SPF/DKIM/DMARC for email | v=spf1 include:... |
| NS | Which servers are authoritative | ns1.cloudflare.com |
| ALIAS/ANAME | CNAME-like at the root domain (provider feature) | shop.com → CDN |
TTL (time to live) — how long resolvers cache the answer. Lower it (e.g. 300 s) before migrating a site so the change propagates quickly. "DNS propagation" = waiting for old cached answers to expire.
bash
nslookup www.shop.com
dig +trace www.shop.com # see each step from the root
ipconfig /flushdns # clear Windows DNS cache