03.02 · Lecture
DNS
Trace what happens between typing a hostname and opening a connection, and name what fails when resolution does.
DNS turns a hostname into the records a client needs before it can connect. Resolution moves through local caches, configured resolvers and authoritative servers, then returns records such as A, AAAA or CNAME. When it fails, the browser has no usable destination, so TLS, TCP or QUIC never really get started.
What this lesson answers
- what happens after typing a hostname
- why does DNS resolution fail before connection
- how do CNAME and TTL affect deployments
Notes
DNS — DNS exists to translate human-readable hostnames into routable records like IP addresses; without it, clients cannot locate servers, TLS certificates may not match, and connection attempts fail before TCP or QUIC can begin.
Key Concepts: - A browser resolving `www.example.com` typically checks browser cache, OS cache, `/etc/hosts`, a recursive resolver, then authoritative DNS servers before returning an address such as `93.184.216.34`. - DNS queries are hierarchical: root servers point to TLD servers like `.com`, TLD servers point to authoritative nameservers, and authoritative…
References
Common questions
- What actually happens when a browser resolves a hostname?
- The browser looks for a cached answer, then asks the operating system and configured resolver if needed. The resolver walks the DNS hierarchy until it reaches the authoritative nameserver for the domain. The final answer is a record such as an A, AAAA or CNAME, which gives the client the next name or address to use.
- Why can a DNS problem stop HTTPS before it starts?
- HTTPS needs an address before it can open a transport connection and begin TLS. If the hostname does not resolve, resolves to a dead target, or only returns an address family the client cannot reach, there is no usable endpoint. The failure is name resolution, not application code or certificate validation.
- Why do fixed DNS records keep failing for some users?
- Resolvers and clients cache DNS answers according to TTL, including some negative answers. If a bad record or missing record was cached, changing the zone does not force every client to re-query immediately. Those clients keep using the old result until their cached entry expires.
Short definition: what is DNS?
