How the Internet Actually Works
From undersea cables to the page in front of you
Every day you tap a screen or type an address, and within a heartbeat a page appears - assembled from data that may have crossed an ocean through a cable no wider than a garden hose. Almost none of us could say how. How the Internet Actually Works is a guided tour of the machinery behind that everyday miracle, written for curious people who do not code. You will follow a single click end to end: down copper and fibre, through undersea cables and routing exchanges, past the internet's phone book, and back to the glowing pixels in front of you. Along the way you will learn why data travels in pieces, how billions of devices find one another, how two strangers' computers can share secrets no eavesdropper can read, and why the whole thing feels instant when it plainly should not. Each chapter uses vivid, accurate analogies - no dumbing down, no hand-waving - and closes with a one-sentence recap you will actually remember. By the final page, the internet will stop being magic and start being something better: a system you genuinely understand. Written by AI and reviewed before publication.
This book was written by AI and reviewed before publication — every BookB title is.
Contents
- 1 What Happens When You Type an Address: The Sixty-Second Tour Free preview
- 2 Wires, Waves and Undersea Cables: The Physical Internet —
- 3 Packets: How Data Travels in Pieces —
- 4 IP Addresses and Routing: How Packets Find Their Way —
- 5 DNS: The Internet's Phone Book —
- 6 TCP and the Art of Reliable Delivery —
- 7 HTTP, HTTPS and What a Web Page Really Is —
- 8 Encryption: How Strangers Keep Secrets —
- 9 CDNs, Caches and Why the Internet Feels Fast —
- 10 Who Runs the Internet - and Where It Goes Next —
Read the opening chapter free
Chapter 1 · What Happens When You Type an Address: The Sixty-Second Tour
Type an address into your browser — say, the website of your favourite newspaper — and press Enter. Roughly half a second later, the page is in front of you: headlines, photographs, that advert that follows you everywhere. It feels like opening a cupboard. It is actually closer to sending a fleet of couriers around the planet and having every one of them report back before you can blink.
This chapter is the aerial view of that half second — the whole journey, compressed. Every stop we pass will get its own chapter later. For now, keep your eye on the courier.
Your browser checks its pockets first
Before anything touches the network, the browser looks in its own cache — a private store of things it has fetched before. If you visited the site yesterday, the logo, the fonts and the stylesheets are probably still on your machine, and the browser will happily reuse them. The fastest network request is the one you never make.
Suppose, though, that this is your first visit. The browser knows the site's name, but names mean nothing to the machinery of the internet, which deals only in numbers. So the first real errand is a lookup.
Turning a name into a number
The internet's directory service is called DNS — the Domain Name System. Your browser asks a nearby DNS resolver, usually one run by your broadband provider: “What number does this name belong to?” The resolver may know instantly, from its own recent memory; if not, it asks a chain of more authoritative servers, working from the right-hand end of the name inwards. Within a few tens of milliseconds, an answer comes back: an IP address — something like 203.0.113.7 — the numerical address of a machine that can serve the page.
Think of it as directory enquiries for computers, except the whole exchange happens faster than a hummingbird flaps its wings. Chapter 5 is devoted to this remarkable, invisible phone book.
Knocking on the door
Armed with a number, your computer opens a connection to the server — the distant machine that holds the website. It does this with a protocol called TCP, using a brisk three-message exchange known as a handshake: your machine says “may I speak to you?”, the server replies “yes — and may I speak to you?”, and your machine confirms. Three messages, one round trip, and the two computers now agree that they are talking to each other and will keep track of everything said.
Why the formality? Because the internet, as we will see in chapter 3, delivers data with the cheerful unreliability of a postal service during a storm. TCP is the discipline that turns that chaos into a dependable conversation. Chapter 6 explains how.
Agreeing to whisper
Almost every serious website today uses HTTPS, which means the next step is a second, cleverer handshake. Your browser and the server agree — in public, while anyone might be listening — on a secret key that only the two of them know. From this point on, everything they exchange is encrypted: scrambled so that eavesdroppers along the route see only noise. The little padlock in your address bar records this agreement. How two strangers can create a shared secret in full view of the world is one of the loveliest ideas in modern mathematics, and chapter 8 unpacks it slowly.
The actual question
Only now — perhaps a tenth of a second in — does your browser ask for what you wanted. It sends an HTTP request, which is startlingly plain once decrypted: essentially “GET the front page, please; here is who I am and what formats I understand.” The server does whatever it must to answer. For a simple page it just reads a file from a disk. For a modern news site it may consult databases, assemble headlines chosen for your region, and stitch the result together on the fly.
Back comes the response: a status code (200 means “here you are”; 404 famously means “no such page”) followed by the page itself, written in HTML — the structural language of the web.
One page, many journeys
Here is the twist most people never suspect: that first response is only the recipe, not the meal. The HTML says, in effect, “this page needs a stylesheet from here, three scripts from there, and forty-two images.” The browser now makes dozens of further requests — many of them to entirely different computers, often ones parked deliberately close to you in your own country by content delivery networks, the subject of chapter 9. A typical modern page is not one delivery but fifty or more, arriving from several directions at once.
Painting the pixels
As the pieces arrive, the browser gets to work like a builder with a plan. It parses the HTML into a structure, applies the stylesheets that describe colour and layout, runs the scripts that add behaviour, and calculates where every letter and picture belongs. Then it paints the result to your screen, and — where a video plays or a menu unfolds — repaints it, many times a second. Rendering is a substantial discipline in its own right; chapter 7 looks at what a web page really is under the skin.
Why it feels instant
Add it up: a cache check, a name lookup, two handshakes, an encrypted request, a response, fifty follow-up deliveries and a full assembly job — much of it, perhaps, across an ocean and back through a glass fibre thinner than a human hair. Half a second. Light in fibre travels at about two-thirds of its speed in a vacuum, which sounds fast until you remember how many round trips are involved; the internet feels instant only because thousands of engineers have spent decades shaving milliseconds wherever milliseconds can be shaved.
None of it is magic. Every step is a mechanism you can understand, and the rest of this book takes them one at a time: the cables, the packets, the addresses, the phone book, the reliable delivery, the language of pages, the secrets, the shortcuts, and the people who keep the whole improbable thing standing.
In one sentence
Typing an address sets off a relay of lookups, handshakes and encrypted deliveries that crosses continents, gathers dozens of parcels and assembles them into a page — all in about the time it takes you to blink twice.
Enjoying it? Read the rest in minutes.
Sign in to buy this book for £5.99, or subscribe and read everything in the library.