What basically happens when you type a URL on the browser and click enter?

We usually do it hundreds of times in a day. We type a few characters into a bar, hit Enter and as if by magic a world of data appears. But for those of us in software engineering, we know it’s not magic. It’s a perfectly orchestrated symphony of protocols.
If you’ve ever wondered what happens in those few milliseconds of "loading," let’s pull back the curtain and look at the engineering blueprint of a web request.
1. The Hunt for the IP Address (DNS Resolution)
The moment you hit Enter, your browser becomes a detective. It parses the URL to see what you’re looking for, but it has a fundamental problem: computers don't understand names like google.com; they only understand numbers called IP addresses.
First, it checks its "memory" (cache). If it doesn't find the address there, it asks the Domain Name System (DNS). Your request travels from your browser cache to your OS, and eventually to your ISP’s resolver. If you're using modern standards like DNS over HTTPS (DoH), this entire "phonebook search" is encrypted, keeping your browsing habits private from prying eyes on the network.
2. The Great Handshake (TCP, TLS, and QUIC)
Once the browser has the IP, it needs to establish a secure "pipe" to the server. Traditionally, this is the TCP Three-Way Handshake. It’s a polite technical conversation where the client and server synchronize their sequence numbers to ensure no data is lost in transit.
If the site uses HTTPS (which is the standard in 2026), they also perform a TLS Handshake. This is where the server proves its identity with a certificate and both parties agree on an encryption key. If you're on a cutting-edge site using HTTP/3, this happens via QUIC over UDP, which combines the connection and encryption steps into one, significantly reducing the "wait time" before data starts moving.
3. The Request & The Server’s Logic
Now that the pipe is secure, your browser sends an HTTP Request. It’s a digital letter saying, "Hey, I’d like to see the /blog path. Here is my session cookie so you know it's me."
On the other end, the web server (like Nginx) or an application server (running Node.js or Python) receives this. It might fetch data from a database, check your permissions, and then package everything into an HTTP Response. This comes with a Status Code:a 200 OK means smooth sailing, while a 500 Internal Server Error means the "engine room" on the server side just had a bad day.
4. Painting the Picture (The Rendering Engine)
The browser finally receives a stream of binary data that it reconstructs into HTML, CSS, and JavaScript. This is where the "Blueprint" truly comes to life:
The DOM & CSSOM: The browser parses the HTML to build the "skeleton" (DOM) and the CSS to build the "style guide" (CSSOM).
The Render Tree: It combines these two to decide exactly which elements need to be visible.
Layout & Paint: The browser calculates the geometry (where every box sits) and finally "paints" the pixels onto your screen.
If there are synchronous scripts in the HTML, the browser will actually stop everything to execute them which is why as developers, we use defer or async to keep the experience smooth.
Why This Matters.
In the time it took you to read this paragraph, your request could have traveled through underwater fiber-optic cables and across continents multiple times. Understanding this blueprint isn't just about passing an assignment; it’s about appreciating the incredible reliability of the systems we build upon. Every millisecond we shave off a DNS lookup or a TLS handshake is a win for the user.

