System Design – What Happens When You Type a URL Into Your Browser?

Published on 30 Oct 2025
Web API system design interview

Typing a URL into your browser may feel instantaneous, but behind the scenes, a complex series of system-level interactions takes place. From resolving domain names to rendering pixels on your screen, this process involves multiple layers of networking, security, and application logic.

Understanding this flow is a fundamental system design concept and a common interview topic. Let’s break it down step by step.


1. Check the Browser Cache

Before making any network requests, the browser checks its local cache.

What happens:

  • The browser looks for a previously stored response for the requested URL.

  • Cached resources may include HTML, CSS, JavaScript, images, and fonts.

  • Cache headers (Cache-Control, ETag, Expires) determine whether the cached content is still valid.

Why it matters:

Using cached content avoids unnecessary network requests, significantly improving page load time and reducing bandwidth usage.


2. DNS (Domain Name System) Lookup

If the resource is not cached, the browser must find the server’s IP address.

What happens:

  • The browser checks the OS cache and local DNS cache.

  • If not found, a request is sent to a DNS resolver.

  • The resolver queries DNS servers (root → TLD → authoritative) to resolve the domain name.

  • The resolved IP address is returned to the browser.

Why it matters:

DNS translates human-readable domain names (e.g., example.com) into machine-readable IP addresses.


3. TCP Connection

Once the IP address is known, the browser establishes a connection with the server.

What happens:

  • A TCP three-way handshake occurs:

    1. SYN

    2. SYN-ACK

    3. ACK

  • This creates a reliable communication channel between the client and server.

Why it matters:

TCP ensures ordered, reliable delivery of data across the network.


4. HTTPS Handshake

If the URL uses HTTPS, a secure connection must be established.

What happens:

  • The browser and server perform a TLS handshake.

  • The server sends its SSL/TLS certificate.

  • The browser verifies the certificate with a trusted Certificate Authority (CA).

  • Encryption keys are exchanged.

Why it matters:

HTTPS ensures data confidentiality, integrity, and authenticity, protecting users from man-in-the-middle attacks.


5. Send the HTTP Request

With a secure connection in place, the browser sends an HTTP request.

What happens:

  • The request includes:

    • HTTP method (GET, POST, etc.)

    • URL path and query parameters

    • Headers (cookies, user-agent, authorization)

  • The request is sent over the established TCP/TLS connection.

Why it matters:

The HTTP request defines exactly what resource the browser is asking for and how the server should respond.


6. Server Response

The server processes the request and returns a response.

What happens:

  • The request may pass through load balancers, firewalls, and application servers.

  • The server executes application logic and queries databases if needed.

  • An HTTP response is sent back, containing:

    • Status code (200, 301, 404, 500, etc.)

    • Headers

    • Response body (HTML, JSON, etc.)

Why it matters:

This step is where business logic runs and data is generated.


7. Browser Renders the Response

Finally, the browser turns the response into a visible webpage.

What happens:

  • The browser parses HTML and builds the DOM.

  • CSS is parsed to create the CSSOM.

  • JavaScript is executed.

  • The DOM and CSSOM are combined to create the render tree.

  • Layout and painting occur to display pixels on the screen.

Why it matters:

Efficient rendering determines how fast users see and interact with the page.


Summary

When you type a URL into your browser, a carefully orchestrated sequence of events occurs:

  • The browser checks its cache to avoid unnecessary work

  • DNS resolves the domain name to an IP address

  • A TCP connection is established

  • A secure HTTPS handshake protects communication

  • An HTTP request is sent to the server

  • The server processes the request and sends a response

  • The browser renders the response into a usable webpage

This end-to-end flow demonstrates how multiple system components—networking, security, and application layers—work together to deliver content in milliseconds. Understanding this process is essential for designing scalable, performant, and secure systems.