Behind the URL: How Browsers Work

Jacob B StephenJacob B Stephen
3 min read

Ever wondered what really happens when you type a URL into your browser and hit Enter? How does the browser know where to go, and how does a webpage appear so quickly? In this post, we’ll break down the entire process—from DNS lookup to rendering the final page—in simple terms.

1.DNS Lookup- Finding the Server’s IP address.

When you type a URL like www.example.com, your browser doesn’t know where that website lives. It needs the website’s IP address to connect to it—kind of like needing someone’s phone number before calling them.

An IP address is a unique set of numbers assigned to every device connected to the internet. It tells other devices exactly where to send data, just like how a mailing address tells the post office where to deliver a letter.

Since computers communicate using IP addresses, not names, your browser needs to translate the website’s name into its IP address.

To do this, your browser first checks if it already knows the IP address from its cache(browser cache, operating system cache, router cache, or ISP’s DNS cache). If it doesn’t, the browser contacts a DNS (Domain Name System) server to find the IP.

2.DNS Response – Resolving the IP Address.

If the IP address is not cached locally, the DNS server begins a series of lookups to find it. It starts by asking a root DNS server, then the top-level domain (TLD) server like .com, and finally the authoritative DNS server responsible for the website.

Once the correct IP address is found, it’s returned to your browser. Now your browser knows exactly where to go to connect with the website.

3.Establishing a TCP Connection – How Your Browser Talks to the Server.

Your browser (the client) now establishes a connection with the server using a process called the three-way handshake. This ensures a reliable and secure communication channel between your browser and the server before any data is exchanged.

4.Sending an HTTP Request – Asking for the Webpage.

Once the TCP connection is successfully established, your browser (the client) sends an HTTP request to the server. This request typically asks for the main HTML file of the webpage you want to visit. It can also include requests for images, stylesheets, scripts, and other resources.

Think of this like placing an order at a restaurant — you're telling the server exactly what you want.

5.Receiving an HTTP Response – Getting the Webpage.

The server processes the request, finds the requested resources, and sends them back to the browser in the form of an HTTP response. This response contains:

  • The requested HTML content

  • A status code (like 200 OK or 404 Not Found)

  • Other details like content type and cookies

Once your browser receives this data, it starts putting the webpage together on your screen.

From the moment you type a URL into your browser, a lot happens behind the scenes — from translating the domain name into an IP address, establishing a secure connection, sending an HTTP request, and finally getting the server’s response.

All these steps work together to deliver the webpage to your screen in just a few seconds. It’s a great example of how complex systems can feel seamless to users — and why understanding the basics of networking and web communication is so important in today’s tech-driven world.

3
Subscribe to my newsletter

Read articles from Jacob B Stephen directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Jacob B Stephen
Jacob B Stephen