A step‑by‑step look at how browsers turn a typed address into a rendered web page, covering DNS, TLS, HTTP and rendering.

Overview

When you press Enter after typing something like https://somewebsite.com/page, the browser launches a multi‑stage workflow that turns a human‑readable address into visual content on your screen. The workflow can be grouped into three high‑level phases: DNS resolution, network communication (including TCP and TLS), and page rendering [5].

Breaking Down the URL

A URL is composed of several parts: a scheme such as http or https, an optional subdomain, the domain name, an optional path, optional query parameters that start with ?, and an optional fragment that starts with # [1].

URL component table

ComponentExample
Schemehttps://
Subdomainwww.
Domainsomewebsite.com
Path/page
Query?id=10
Fragment#section2

DNS Resolution – Finding the Server’s IP

Before any network traffic is sent, the browser must translate the domain name into an IP address. It first checks the local HOSTS file, then any cached entries in the browser, OS, router or ISP. If no cached entry exists, the request moves up the DNS hierarchy: recursive resolver → root nameserver → TLD nameserver → authoritative nameserver [1,3,4].

  • Recursive resolvers answer queries on behalf of the client [1]
  • Root nameservers (13 globally) direct queries to the correct TLD servers [1]
  • TLD nameservers know the authoritative servers for a specific domain extension [1]
  • Authoritative nameservers hold the definitive mapping of the domain to its IP address [1]

If the IP address is already cached at any level, the browser skips the full lookup and uses the cached value immediately [3]. DNS functions like a distributed address book where the key is the domain name and the value is the numeric IP address, which can change over time [5].

Establishing a Secure Connection

With the IP address known, the browser opens a TCP connection to the server. TCP uses a three‑way handshake (SYN, SYN‑ACK, ACK) to confirm that both ends are ready to exchange data [3].

Because the URL uses the https scheme, the browser immediately follows the TCP handshake with a TLS handshake. TLS negotiates encryption algorithms, authenticates the server’s certificate, and creates an encrypted session before any HTTP data is transmitted, protecting credentials and other sensitive information [2,4].

HTTP Request and Server Response

Once the encrypted channel is in place, the browser sends an HTTP request. The request line contains the method (usually GET), the path, and the HTTP version. Headers such as Host, User‑Agent, Accept, and any cookies are also included [3].

The server processes the request, possibly running backend code or fetching data from a database, and returns an HTTP response. The response starts with a status line (e.g., HTTP/1.1 200 OK), followed by headers—including Content‑Type, which tells the browser how to interpret the body—and finally the response body itself, often HTML [3,4].

Rendering the Page

After the HTML arrives, the browser begins parsing it top‑to‑bottom. It builds the Document Object Model (DOM) and, when it encounters CSS, constructs the CSS Object Model (CSSOM). The two trees are merged into a render tree that determines the layout of every element on the page [4].

During parsing the browser discovers additional resources—stylesheets, scripts, images, fonts—and issues separate HTTP requests for each. These requests follow the same DNS/TCP/TLS flow as the initial page request [3].

Once all required resources are fetched, the browser calculates the final layout, paints pixels to the screen, and finally executes JavaScript to add interactivity. The whole process is coordinated by the browser’s rendering pipeline rather than a single “open website” command [4].

Frequently asked questions

Why does the browser check a HOSTS file before contacting DNS servers?

The HOSTS file provides a local override for domain‑to‑IP mappings, allowing the browser to resolve a name instantly without network queries [1].

What role does TLS play when I type an https URL?

TLS encrypts the data exchanged after the TCP connection, verifies the server’s identity with a certificate, and ensures that sensitive information cannot be read by intermediaries [2,4].

How does the browser know which resources to request after the initial HTML arrives?

During HTML parsing the browser discovers tags that reference external files (CSS, JavaScript, images, fonts) and automatically issues additional HTTP requests for each resource [3].

Can the same IP address be used for multiple domain names?

Yes. DNS maps many domain names to a single IP address, and the server distinguishes requests using the Host header in the HTTP request [1].

What happens if the DNS lookup fails?

If no IP address can be resolved, the browser cannot establish a TCP connection and typically displays an error page indicating that the site cannot be reached.

References

  1. newsletter.techworld-with-milan.com What happens when you type a URL into your browser?
  2. aws.amazon.com What happens when you type a URL into your browser? | Front-End Web & Mobile
  3. dev.to What Happens When You Type a URL in the Browser? - DEV Community
  4. jsmastery.com What happens when you type a URL and press ENTER?
  5. cloudnativeengineer.substack.com What happens when you type a URL into your browser?
  6. geeksforgeeks.org What happens when we type a URL - GeeksforGeeks