How the Internet Works: What Happens When You Type a URL

From URL to Page in 300 Milliseconds

You type google.com and the page appears. Behind that: dozens of protocols, hundreds of servers, and millions of lines of code.

Step 1: DNS Resolution

Your browser asks: what IP address is google.com?

# DNS hierarchy:
# 1. Browser cache
# 2. OS cache
# 3. Local DNS resolver (ISP or 8.8.8.8)
# 4. Root nameserver
# 5. .com TLD nameserver
# 6. google.com nameserver
# Result: google.com = 142.250.80.46

Step 2: TCP Three-Way Handshake

Client => Server: SYN (Want to connect)
Server => Client: SYN-ACK (Ready)
Client => Server: ACK (Confirmed)
# Connection established!

Step 3: TLS Encryption

For HTTPS, client and server negotiate encryption before any data flows.

Step 4: HTTP Request and Response

GET / HTTP/2
Host: www.google.com
User-Agent: Mozilla/5.0
Accept: text/html

---

HTTP/2 200 OK
Content-Type: text/html
[HTML content]

Step 5: Browser Rendering

  1. Parse HTML into DOM tree
  2. Parse CSS into CSSOM
  3. Combine into render tree
  4. Layout (calculate positions)
  5. Paint (draw pixels)

Key Protocols

Protocol Purpose
HTTP/HTTPS Web communication
DNS Name to IP resolution
TCP Reliable data delivery
TLS Encryption
IP Packet routing

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top