← Module 05 · Application Layer & Name Resolution

Capstone: What Happens When You Type a URL

Every mechanism from this module, and several from the ones before it, in the order they actually fire, for one ordinary page load.

The walk-through

This is worth working through slowly, out loud, the first few times. It's the single best way to check that every mechanism you have covered actually fits together, instead of sitting in your head as separate, disconnected facts.

  1. Parse the URL. Split it into a scheme (https://), a host (example.com), and a path (/page).
  2. Check caches first. The browser checks its own cache, then the OS's (Operating System's) DNS cache, before asking anyone else anything.
  3. DNS resolution. If the name isn't cached, a recursive resolver walks the DNS hierarchy, root, then TLD (Top-Level Domain), then authoritative, to turn example.com into an IP (Internet Protocol) address. See DNS Resolution Flow.
  4. TCP three-way handshake. The browser opens a TCP (Transmission Control Protocol) connection to that IP address on the target port, SYN, SYN-ACK, ACK. See TCP 3-Way Handshake & Termination.
  5. TLS handshake, if it's HTTPS. Client and server agree on a cipher suite, the server proves its identity with a certificate, and both sides establish shared session keys before any HTTP data is sent. Covered in full in the next module's TLS/SSL Handshake.
  6. HTTP request and response. The browser sends its request over that now-secured connection and the server replies with a status code, headers, and a body. See HTTP/HTTPS: 1.1 vs 2 vs 3.
  7. Parse and fetch everything else. The browser parses the returned HTML and discovers more resources it needs, CSS, JavaScript, images, fonts, each one repeating steps 2 through 6 on its own, often in parallel.
  8. Render the page. Once enough of that has arrived, the browser builds the page and the user actually sees something.
BROWSER SERVER 1. DNS resolution the hostname becomes an IP address 2. TCP three-way handshake SYN, SYN-ACK, ACK: a connection is open 3. TLS handshake certificate checked, session keys agreed on 4. HTTP request and response encrypted, over the now-open connection 5. Parse, fetch, render the page you actually see finally appears
Five phases, five different topics on this site, all happening for a single page load, and most real pages repeat the DNS-to-render sequence dozens of times over for every additional resource they load.
A GOOD WAY TO CHECK YOUR OWN UNDERSTANDING

Try narrating this whole sequence out loud for a real HTTPS page load, naming which specific mechanism handles each step, DNS, TCP, TLS, HTTP, without looking anything up. Any step that feels shaky is exactly the topic worth re-reading. The TLS handshake step is covered in full in the next module; it's worth coming back to this page once you've read it.