DEV Community

Cover image for What Really Happens When You Type a URL in Your Browser? (Explained Step-by-Step)
nithish rodrigo
nithish rodrigo

Posted on

What Really Happens When You Type a URL in Your Browser? (Explained Step-by-Step)

When you type a URL like www.google.com into your browser, a lot more happens behind the scenes than you might think.

Let’s break it down step by step.
🌐 Step 1: DNS Resolution

Your browser doesn’t understand domain namesβ€”it needs an IP address.

So it checks:

Browser cache
OS cache
Router cache
ISP DNS
Public DNS like Google Public DNS

Once resolved, you get the IP address of the server.

πŸ”— Step 2: Establishing a TCP Connection

Now your browser connects to the server using TCP.

This happens via the 3-way handshake:

SYN β†’ Request to connect
SYN-ACK β†’ Acknowledgement from server
ACK β†’ Final confirmation

This ensures reliable communication.

πŸ” Step 3: Secure the Connection (TLS/SSL)

Before sending data:

Server sends SSL certificate
Browser verifies it
Encryption is established

This is why you see πŸ”’ in your browser.

πŸ“‘ Step 4: Sending HTTP Request

Now the browser sends:

HTTP GET request (to fetch page)
or POST request (to send data)

This happens at the Application Layer (OSI Layer 7).

🌍 Step 5: Network Journey

Your request travels through:

Local router
ISP
Global internet backbone
Undersea cables
Data centers
βš–οΈ Step 6: Load Balancer

Before reaching the server:

A load balancer distributes traffic
Prevents overload
Improves performance and availability
πŸ–₯️ Step 7: Server Processing

The backend server:

Processes your request
Fetches data
Generates response
🎨 Step 8: Browser Rendering

Finally, your browser:

Parses HTML
Applies CSS
Executes JavaScript

And boom πŸ’₯ β€” the page loads!

🧠 Final Thoughts

What looks like a simple action actually involves:

DNS resolution
Networking
Security
Distributed systems
Application processing

Understanding this flow is crucial for SREs, DevOps Engineers, and Backend Developers.

Top comments (0)