1. What a URL Actually Represents
A URL acts as an instruction set for the browser. It describes how to reach a resource and where that resource lives. A typical URL can include:
• Scheme (Protocol)
Examples: http://, https://
This tells the browser what communication rules to follow.
• Domain Name
Example: example.com
A readable name that must be translated into a numerical IP address.
• Path
Example: /products/
Shows the location of a section or directory on the server.
• Specific Resource
Examples: index.html, logo.png, main.js
Indicates the exact file the browser should retrieve.
All these elements work together to point the browser to a unique item on a remote machine.
2. DNS Resolution: Mapping the Domain to an IP
Browsers can’t connect using domain names directly. They need an IP address.
This is where DNS (Domain Name System) comes in — it acts like a global address directory.
The lookup sequence generally follows this order:
- Browser Cache — checks if the IP is already stored from a previous visit
- OS Cache — the operating system may have the mapping saved
- DNS Resolver — typically provided by your ISP or a public resolver
- DNS Hierarchy
- Root servers
- TLD servers (
.com,.net,.org, etc.) - Authoritative DNS server for the domain
Once the resolver finds the correct IP, the browser can move forward.
3. Creating a TCP Connection
With the IP known, the next step is establishing a communication link.
Most websites rely on TCP, a protocol designed for reliable data transfer.
A TCP connection is created using a three-step negotiation called the three-way handshake:
- Browser → Server: SYN
- Server → Browser: SYN-ACK
- Browser → Server: ACK
Modern browsers often keep these connections alive so future requests reuse the same link, reducing latency.
4. HTTPS: Setting Up Encryption (TLS Handshake)
If the URL uses HTTPS, the browser must secure the connection.
This involves an additional process known as the TLS handshake:
- The server presents its SSL/TLS certificate
- The browser validates it
- Both sides agree on encryption methods
- A shared session key is generated
After this, all communication is encrypted end-to-end.
5. Sending an HTTP Request
Once the connection is ready, the browser submits an HTTP request.
The request includes:
- Method (GET, POST, etc.)
- Target path
- Headers (cookies, accepted formats, browser details)
- Body (for POST/PUT requests)
Example:
GET /index.html HTTP/1.1
Host: example.com
6. How the Server Handles the Request
The server receives the request and decides how to respond:
- Retrieves the requested file or runs backend logic
- Prepares the response body (HTML, JSON, images, etc.)
- Adds relevant headers
- Sends it back to the browser with a status code like
- 200 OK
- 404 Not Found
- 500 Internal Server Error
7. Browser Rendering Pipeline
Once the response arrives, the browser begins turning raw data into a visible webpage.
Step-by-step:
• HTML Parsing → DOM Creation
The browser constructs the Document Object Model.
• Fetching Linked Resources
CSS, JavaScript, images, fonts — each may generate additional requests.
• CSS Parsing → CSSOM Creation
Used to apply styling.
• JavaScript Execution
Scripts can modify the DOM, change styles, or fetch more data.
• Layout and Painting
The browser calculates positions, applies styles, and finally renders the pixels on the screen.
8. The Final Result
What looked like a simple URL entry actually triggered caching checks, DNS lookups, secure handshakes, request/response cycles, multiple resource fetches, and a rendering pipeline — all executed in milliseconds.
Quick Recap
When a URL is entered, the browser:
- Interprets the URL components
- Resolves the domain name into an IP
- Establishes a TCP connection
- Sets up encryption (for HTTPS)
- Sends an HTTP request
- Receives and processes the server’s response
- Loads additional resources
- Renders everything into a functional webpage
This is the entire behind-the-scenes mechanism that powers the modern web.
Top comments (0)