What Happens When You Type google.com: From DNS Resolution to TCP, TLS, and DOM Painting
A deep dive into what happens when you type google.com: recursive DNS resolution, TCP three-way handshake, TLS 1.3 negotiation, and DOM rendering.
On this page
When you type https://google.com into your browser’s address bar and press Enter, a clean white search box with a minimalist logo appears in a few hundred milliseconds.
To the user, this feels like an atomic, instantaneous event. But underneath the glass, your browser orchestrates an intricate sequence of physical and software events spanning local operating system caches, global Anycast DNS hierarchies, fiber-optic light pulses, TLS cryptographic handshakes, and GPU rasterization pipelines.
Tracing this journey from the keystroke to the painted pixel is one of the foundational mental models in systems engineering.
+-----------------------------------------------------------------------------------+
| THE BROWSER-TO-PIXEL LIFECYCLE FOR "GOOGLE.COM" |
+-----------------------------------------------------------------------------------+
[Browser Address Bar: User presses Enter]
|
v
1. URL Parsing & HSTS Check (Strict Transport Security pre-load list)
|
v
2. DNS Hierarchy Resolution (Browser -> OS -> Router -> ISP -> Root -> TLD -> Auth)
|
v
3. TCP Connection Handshake (SYN -> SYN-ACK -> ACK)
|
v
4. TLS 1.3 Cryptographic Negotiation (ECDHE Key Exchange + Certificate Verification)
|
v
5. HTTP/2 or HTTP/3 Request & Response (Multiplexed Streams, HPACK Compression)
|
v
6. Critical Rendering Path (DOM + CSSOM -> Render Tree -> Layout -> Paint -> Composite)
1. Keystroke to Hostname Resolution: The DNS Hierarchy
Before a single network packet can leave your machine, the browser must convert the human-readable domain name google.com into an Internet Protocol (IP) address like 142.250.190.46 (IPv4) or 2a00:1450:4009:81f::200e (IPv6).
The resolution process checks multiple caching tiers in order of proximity:
DNS CACHE LOOKUP WATERFALL
[Browser Cache] ------------ Hit? ----> Return IP (Fastest: < 1ms)
| Miss
v
[Operating System Cache] --- Hit? ----> Return IP (Check hosts file + getaddrinfo)
| Miss
v
[Local Router Cache] ------- Hit? ----> Return IP (Local LAN Gateway)
| Miss
v
[ISP Recursive Resolver] --- Hit? ----> Return IP (Comcast, Cloudflare 1.1.1.1, Google 8.8.8.8)
| Miss
v
[Full Iterative DNS Walk] -> Root (.) -> TLD (.com) -> Authoritative (ns1.google.com)
The Iterative DNS Walk
When none of the local caches hold a valid record, the recursive resolver (e.g., 8.8.8.8 or your ISP resolver) conducts an iterative walk down the domain name system hierarchy:
- Root Nameservers (
.): There are 13 logical root server IP addresses worldwide (operated across hundreds of physical Anycast instances). The resolver queries a root server: “Where do I find.com?” The root server responds with the IP addresses of the Top-Level Domain (TLD) servers responsible for.com. - TLD Nameservers (
.com): The resolver queries the Verisign.comTLD servers: “Where do I findgoogle.com?” The TLD server responds with the Nameserver (NS) records for Google:ns1.google.comthroughns4.google.com. - Authoritative Nameservers: The resolver contacts Google’s authoritative nameserver: “What is the IP address for
google.com?” Google’s DNS infrastructure, utilizing Anycast routing and GeoDNS, selects the IP address of the edge data center closest to the user and returns an A Record (IPv4) or AAAA Record (IPv6) with a Time-To-Live (TTL), typically 300 seconds. - Caching: The recursive resolver caches this record, returns it to the OS resolver, which caches it and hands it to the browser.
2. Opening the Wire: The TCP Three-Way Handshake
Now possessing the target IP address and knowing the default HTTPS port (443), the client operating system opens a network socket and initiates the Transmission Control Protocol (TCP) three-way handshake:
Client (Your Browser) Google Edge Server
| |
| ---------- 1. TCP SYN (Seq=X) ---------------------> |
| |
| <--------- 2. TCP SYN-ACK (Seq=Y, Ack=X+1) -------- |
| |
| ---------- 3. TCP ACK (Seq=X+1, Ack=Y+1) ----------> |
| |
[ Connection Established: Full-Duplex Stream Ready ]
- SYN (Synchronize): The client selects a random 32-bit sequence number $X$ and sends a packet with the SYN control flag enabled to Google’s edge router.
- SYN-ACK (Synchronize-Acknowledge): Google’s server acknowledges receipt with $ACK = X + 1$, generates its own initial sequence number $Y$, and returns a SYN-ACK packet.
- ACK (Acknowledge): The client transmits an ACK packet with $ACK = Y + 1$.
This handshake establishes sequence numbering, window scaling parameters, and maximum segment sizes (MSS) to guarantee reliable, ordered byte delivery across an unreliable network. This step consumes exactly one round-trip time (1-RTT).
3. Securing the Pipe: The TLS 1.3 Handshake
Because the connection uses HTTPS, raw application data cannot be transmitted over plain TCP. The browser and server must establish an encrypted cryptographic tunnel using Transport Layer Security (TLS).
Modern browsers use TLS 1.3, which significantly slashes connection latency compared to legacy TLS 1.2:
TLS 1.2 Handshake (2 Full Round Trips - 2-RTT):
ClientHello ----------->
<----------- ServerHello, Certificate, ServerKeyExchange
ClientKeyExchange ----->
Finished -------------->
<----------- Finished
[Encrypted HTTP Data Transmitted]
TLS 1.3 Handshake (1 Full Round Trip - 1-RTT):
ClientHello + KeyShare (ECDHE) ------------>
<------------ ServerHello + KeyShare + Encrypted Certificate + Finished
[Encrypted HTTP Data Transmitted Immediately!]
The TLS 1.3 Negotiation Steps
- ClientHello + Key Share: The browser sends its supported cipher suites (e.g.,
TLS_AES_256_GCM_SHA384), TLS version, and pre-emptively generates an ephemeral Diffie-Hellman public key share (e.g., Curve25519) in the very first packet. - ServerHello + Handshake Completion: Google’s server selects the cipher suite, computes the shared secret using the client’s key share, generates its own public key share, and signs the payload with its digital certificate. It transmits its key share, encrypted certificate chain, and HMAC verification tag in a single return burst.
- Symmetric Encryption Key Derived: Both client and server now possess the shared secret without ever transmitting private keys over the wire. They derive symmetric session keys (AES-GCM or ChaCha20-Poly1305).
- 0-RTT Resumption (Early Data): If the user visited Google recently, TLS 1.3 supports session tickets, allowing the client to send encrypted HTTP GET data alongside the
ClientHellopacket, achieving zero-round-trip time connection resumption.
4. The Request and Response Cycle: HTTP/2 and HTTP/3
With the secure pipe open, the browser issues an HTTP GET / request.
On modern connections, Google leverages HTTP/2 (binary framing over TCP) or HTTP/3 (multiplexed streams over QUIC/UDP):
GET / HTTP/2
Host: www.google.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ...
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate, br, zstd
sec-ch-ua: "Chromium";v="131"
Google’s reverse proxy terminates the connection, routes the query to internal search and indexing microservices, and responds with compressed HTML bytes:
HTTP/2 200 OK
content-type: text/html; charset=UTF-8
content-encoding: br
cache-control: private, max-age=0
date: Sun, 15 Nov 2026 14:20:00 GMT
strict-transport-security: max-age=31536000
The response payload is delivered in chunked TCP packets, compressed using Brotli (br) or Zstandard (zstd).
5. The Browser Critical Rendering Path: Bytes to Pixels
Once the browser’s networking thread receives the initial chunks of HTML, the rendering engine (Blink in Chromium, WebKit in Safari, Gecko in Firefox) begins processing the data through the Critical Rendering Path:
CRITICAL RENDERING PATH
Bytes (01010101)
|
v
Characters ("<", "h", "t", "m", "l", ">")
|
v
Tokens (StartTag: html, StartTag: body, StartTag: div)
|
v
Nodes (HTMLDocument, HTMLBodyElement, HTMLDivElement)
|
+-------------------------------+
| |
v v
DOM Tree CSSOM Tree
(Content Structure) (Style Rules)
| |
+--------------+----------------+
|
v
Render Tree
(Visible Nodes Only)
|
v
Layout
(Geometry: X, Y, Width, Height)
|
v
Paint
(Pixels, Vectors, Shadows)
|
v
Composite
(GPU Texture Assembly to Screen)
Step 1: DOM Tree Construction
The browser’s HTML tokenizer converts raw character streams into tokens, which are turned into Node objects forming the Document Object Model (DOM). When the parser encounters external resources like CSS <link> or JavaScript <script>, it queues background fetch requests.
Step 2: CSSOM Construction
CSS rules from stylesheets and <style> blocks are parsed into the CSS Object Model (CSSOM) tree. CSS is render-blocking: the browser will not paint pixels until it understands all styling rules to prevent a Flash of Unstyled Content (FOUC).
Step 3: Render Tree Synthesis
The DOM and CSSOM combine into the Render Tree. The Render Tree excludes non-visible elements (such as <head>, <meta>, and any elements styled with display: none). Elements with visibility: hidden are included because they occupy layout space.
Step 4: Layout (Reflow)
The browser computes the exact geometric dimensions and screen coordinates for every node in the Render Tree relative to the viewport. It runs box-model calculations (margins, padding, border, flexbox, CSS grid).
Step 5: Paint and Rasterization
The rendering engine converts layout boxes into actual visual pixels. It records draw calls for colors, gradients, borders, text fonts, and box-shadows into display lists.
Step 6: GPU Compositing
Rather than painting the entire document into a single flat bitmap, modern browsers partition complex elements (such as transform, opacity, canvas, or fixed headers) into independent Compositor Layers. The main thread sends these layer tiles to the GPU, which composites them into frame buffers and flushes them to the display at 60Hz or 120Hz.
Latency Breakdown: Milliseconds at a Glance
| Stage | Mechanism | Typical Latency | Primary Optimization |
|---|---|---|---|
| DNS Resolution | Anycast + UDP recursive walk | 10 to 80 ms | DNS prefetching (rel="dns-prefetch"), long TTLs |
| TCP Handshake | 3-way SYN / ACK (1-RTT) | 15 to 50 ms | TCP Fast Open, Keep-Alive connection pooling |
| TLS Negotiation | TLS 1.3 ECDHE (1-RTT) | 15 to 50 ms | 0-RTT session resumption, TLS False Start |
| HTTP Request/Response | Server compute + TTFB | 20 to 100 ms | Edge caching, Brotli compression, HTTP/3 |
| Parsing & Rendering | DOM / CSSOM / Layout / GPU Paint | 30 to 150 ms | Inlining critical CSS, deferring scripts (defer/async) |
Summary and Key Takeaways
- DNS is hierarchical and heavily cached: Resolution cascades through browser, OS, router, ISP resolver, and authoritative nameservers.
- Transport requires two distinct handshakes: TCP establishes reliable packet order (1-RTT), while TLS 1.3 negotiates symmetric cryptographic session keys (1-RTT).
- Modern protocols save round trips: TLS 1.3 and HTTP/3 QUIC slash connection startup latency from 3-4 round trips down to 1-RTT or 0-RTT.
- The Critical Rendering Path is pipelined: Browsers stream HTML, constructing the DOM and CSSOM concurrently before calculating layout geometry.
- Compositing runs on the GPU: Modern rendering engines split complex visual surfaces into layers, allowing the GPU to rasterize and animate without triggering costly main-thread layout reflows.



/* Comments */
Comments are offline right now — we reconnect automatically, nothing is lost.