How the Internet Works: From Your Browser to a Server and Back
When you type a URL, a complex chain of protocols springs into action. This article explains DNS, TCP/IP, HTTP, and how data travels across the globe in milliseconds.
What Is the Internet?
The internet is a global network of interconnected computers that communicate using standardized protocols. It is not owned by any single entity; it is a decentralized mesh of networks, from home routers to university backbones to transoceanic fiber-optic cables, all agreeing to use the same language to exchange data.
When you type a web address and press Enter, a remarkable chain of events unfolds in a fraction of a second. Understanding this chain illuminates not just the internet but the broader principles of networked computing: abstraction, layering, and the power of open standards.
Step 1: DNS - Translating Names to Numbers
Computers communicate using IP addresses, numerical labels like 172.217.10.46. Humans use domain names like google.com. The Domain Name System (DNS) is the phone book that translates one into the other.
When you request a URL, your computer first checks its local cache. If it does not know the address, it queries a DNS resolver, typically provided by your ISP or a public service like Google's 8.8.8.8. The resolver walks a hierarchy: root name servers, then .com top-level domain servers, then the authoritative name server for the specific domain, until it gets the IP address. The whole process typically takes less than 100 milliseconds and is invisible to the user.
Step 2: Establishing a Connection - TCP/IP
With the IP address in hand, your browser establishes a connection using the TCP/IP protocol suite. IP (Internet Protocol) handles addressing and routing: it breaks data into packets and gets each packet from source to destination, potentially via different routes. TCP (Transmission Control Protocol) sits on top and provides reliable, ordered delivery: it ensures all packets arrive, detects errors, and reassembles packets in the correct order.
TCP begins with a three-way handshake: your computer sends a SYN (synchronize) packet, the server responds with SYN-ACK, and your computer replies with ACK. This establishes a connection before any data flows. For secure websites (HTTPS), a TLS handshake follows, negotiating encryption parameters and verifying the server's identity using digital certificates.
Step 3: The HTTP Request
Once a connection is established, your browser sends an HTTP (HyperText Transfer Protocol) request. A typical GET request includes the specific resource path, the host, and various headers describing the browser type, acceptable content formats, and cached content it already has.
The server processes this request, locates the resource (a file, a database result, a dynamically generated page), and sends back an HTTP response with a status code (200 for success, 404 for not found, 301 for redirect, and so on) followed by the content. Modern HTTP/2 and HTTP/3 improve on the original protocol with multiplexing (multiple requests over a single connection) and, in HTTP/3, a new transport protocol called QUIC that reduces latency further.
Step 4: Packets, Routers, and the Physical Internet
Data does not travel as a continuous stream; it is broken into small packets, typically around 1,500 bytes each. Each packet is independently routed from source to destination through a series of routers, specialized devices that read the IP destination address and decide where to forward the packet next.
Routers use routing protocols like BGP (Border Gateway Protocol) to maintain and share maps of reachable networks. BGP is the protocol that glues together the thousands of independent networks (called autonomous systems) that make up the internet. Your packet might hop through 15 to 20 routers and travel over copper wires, fiber-optic cables, and possibly satellite links before reaching its destination.
Step 5: Rendering the Page
When the HTML file arrives, your browser begins parsing it and building the DOM (Document Object Model). As it encounters links to CSS stylesheets, JavaScript files, and images, it launches additional HTTP requests in parallel. CSS is parsed into a CSSOM, the DOM and CSSOM are combined into a render tree, and the browser calculates layout (where every element goes) before finally painting pixels to the screen.
Modern sites may involve dozens or hundreds of sub-requests to servers around the world: CDN nodes for cached assets, ad servers, analytics services, font providers. A Content Delivery Network (CDN) caches copies of static content at geographically distributed servers, so your CSS and images come from a server nearby rather than the origin server thousands of kilometers away.
The Infrastructure Underneath
The physical internet runs on fiber-optic cables that carry light pulses representing binary data. Undersea cables, thin as a garden hose but carrying terabits per second, connect continents. Internet Exchange Points (IXPs) in major cities are physical locations where networks exchange traffic directly, reducing costs and latency.
The internet's resilience comes from its decentralized design: if one route fails, packets automatically find another. This design was originally motivated by military survivability requirements, though the ARPANET (the internet's ancestor) was never primarily built to survive nuclear war as the popular myth claims. The layered, open-standards architecture that makes the internet so resilient is also what allowed it to grow explosively from a few research universities to a global infrastructure connecting billions of devices.
Related Articles
how things work
How 3D Printers Work: FDM, SLA, and Why They're Changing Manufacturing
Understand the technology behind 3D printing, including FDM and SLA processes, the materials used, and how additive manufacturing is transforming industries worldwide.
10 min read
how things work
How Air Conditioning Reshaped Modern Civilization
Willis Carrier's 1902 invention for a printing plant became the technology that enabled Sun Belt migration, transformed architecture, and now consumes 10% of global electricity.
9 min read
how things work
How Airplane Wings Generate Lift: The Physics of Flight
Lift is the upward force that keeps aircraft airborne, and its real explanation is more nuanced than the popular Bernoulli story. This article explains how wings actually work using correct aerodynamics.
9 min read
how things work
How Batteries Work: Chemistry, Types, and Applications
Understand the chemistry behind batteries, how they store and release electrical energy, the major battery types, and their applications in modern technology.
8 min read