DNS — Names to Addresses
One Monday nobody at Kite Studio can open any website, yet ping 198.51.100.25 works perfectly. The network is fine; the name lookups are failing. DNS is so invisible when it works that people forget every single visit to a website begins with it.
The rule
DNS asks from the top down, then remembers the answer for a while.
The job. DNS (Domain Name System) turns names people remember, like shop.example.com, into IP addresses routers can use. It is a worldwide, distributed directory: no single server holds every name.
The hierarchy. Names are read right to left. At the top are the root servers. They know who runs each top-level domain such as .com or .in. The .com servers know which authoritative server holds the records for example.com. That authoritative server gives the final answer for shop.example.com.
The resolver. Asha's laptop does not walk that tree itself. It asks one recursive resolver — run by the ISP, by the office, or a public service — and the resolver does the walking. Well-known public resolvers include Cloudflare (1.1.1.1), Google (8.8.8.8), Quad9 (9.9.9.9, which also blocks known malicious domains) and OpenDNS (208.67.222.222, with optional content filtering).
Caching. Every answer comes with a TTL (time to live) in seconds. The resolver and the laptop keep the answer until the TTL runs out, so the next lookup is instant.
Record types to know: A (name → IPv4 address), AAAA (name → IPv6 address), CNAME (this name is an alias of another name), MX (which server receives email for the domain), NS (which servers are authoritative) and TXT (free text, often used for verification). DNS queries normally use UDP port 53, falling back to TCP for large answers.