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
RecordPurposeExample
A / AAAAName → IPv4 / IPv6www → 20.43.10.5
CNAMEAlias to another namewww → shop.azurewebsites.net
MXMail serversshop.com → mail.protection.outlook.com
TXTText — domain verification, SPF/DKIM/DMARC for emailv=spf1 include:...
NSWhich servers are authoritativens1.cloudflare.com
ALIAS/ANAMECNAME-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