The internet: how it was built, and what happens when you load a page
The first half of this guide is the history: 30 dated milestones from the first ARPANET message in 1969 to HTTP/3 in 2022, each with its source. The second half follows one page load through the protocols that history produced, DNS, TCP, TLS and HTTP, and counts the round trips each one costs.
Overview
The internet is a network of networks: tens of thousands of independently run networks that agree to carry each other’s packets using the Internet Protocol. It grew out of the ARPANET, a research network funded by the US Department of Defense, and took its present shape in stages, each adding one layer of the stack that every page load still uses.
That is why the history and the page load belong on one page. The ARPANET and TCP/IP gave us packets and connections; DNS gave us names; BGP let networks find routes to each other; the web added URLs and HTTP; TLS added encryption; and QUIC and HTTP/3 rebuilt the transport to save round trips. Loading a page today runs through all of them in order, and the second half of this guide counts what each one costs.
Internet history timeline
Drag the year to see which parts of the stack existed at that point, and filter the timeline by layer. Each entry links to its source; for protocols that is the RFC that first defined them.
| Applications | Email (SMTP) 1982 |
|---|---|
| Encryption | nothing yet |
| Transport | UDP 1980TCP 1981 |
| Naming | DNS 1983 |
| Internet and routing | IPv4 1981 |
| Local links | Ethernet 1973 |
| Networks | ARPANET 1969 |
New in 1983: DNS. Older protocols stay listed even where they have since been replaced.
- The first ARPANET message Networks
A month after the first ARPANET node is installed at UCLA, a computer there sends the first host-to-host message to one at the Stanford Research Institute. By the end of the year the network joins four sites: UCLA, SRI, UC Santa Barbara and the University of Utah.
October 1969 · Internet Society, A Brief History of the Internet - Email Applications
Ray Tomlinson at BBN writes the basic programs for sending and reading email over the ARPANET, and email becomes the network’s first widely used application.
March 1972 · Internet Society, A Brief History of the Internet - Ethernet Local links
Bob Metcalfe and David Boggs at Xerox PARC start developing Ethernet, a way for the computers on one site to share a cable. By 1975 around a hundred Ethernet boards are in use at PARC.
1973 · ACM Turing Award citation, Bob Metcalfe - A protocol for joining networks Transport
Vint Cerf and Bob Kahn publish “A Protocol for Packet Network Intercommunication”, the design that becomes TCP and IP: gateways between independent networks, and hosts responsible for reliable delivery.
May 1974 · Cerf and Kahn, IEEE Transactions on Communications - UDP Transport
RFC 768 defines the User Datagram Protocol: IP plus port numbers and a checksum, with no connection and no retransmission.
August 1980 · RFC 768 - IPv4 and TCP Internet and routing
RFC 791 and RFC 793 define the Internet Protocol, version 4, with its 32-bit addresses, and the Transmission Control Protocol.
September 1981 · RFC 791 - SMTP Applications
RFC 821 defines the Simple Mail Transfer Protocol, still the way mail servers hand messages to each other.
August 1982 · RFC 821 - The ARPANET switches to TCP/IP Networks
Every host on the ARPANET moves from the older NCP protocol to TCP/IP on a single “flag day”: hosts that had not converted could no longer talk to the rest.
1 January 1983 · Internet Society, A Brief History of the Internet - DNS Naming
Paul Mockapetris publishes RFC 882 and RFC 883, the Domain Name System. Names are now looked up in a distributed hierarchy instead of a single hosts file copied to every machine.
November 1983 · RFC 882 - NSFNET Networks
The US National Science Foundation builds NSFNET, a backbone joining university supercomputer centres at 56 kbit/s. It becomes the core of the internet for the next decade.
1986 · National Science Foundation - TCP congestion control Transport
After the internet suffered the first of a series of congestion collapses in October 1986, Van Jacobson’s paper “Congestion Avoidance and Control” (SIGCOMM 1988) gives TCP slow start and congestion avoidance, which every TCP still uses.
1988 · Jacobson, Congestion Avoidance and Control - The web is proposed Applications
Tim Berners-Lee, at CERN, writes “Information Management: A Proposal”, describing linked documents served over the network.
March 1989 · W3C, the original proposal - BGP Internet and routing
RFC 1105 defines the Border Gateway Protocol, which independent networks use to tell each other which addresses they can reach. BGP-4, the version still in use, follows in 1994.
June 1989 · RFC 1105 - The first website Applications
The first website, info.cern.ch, runs on Berners-Lee’s NeXT computer at CERN. The protocol as written down in 1991, later called HTTP/0.9, has one request, GET followed by an address, and the response is the HTML document with no headers.
1991 · W3C, The Original HTTP as defined in 1991 - The web is free to use Applications
CERN puts the World Wide Web software in the public domain, so anyone can run a web server or write a browser without asking permission.
30 April 1993 · CERN, The birth of the web - CIDR Internet and routing
RFC 1519 replaces the fixed class A, B and C address blocks with variable-length prefixes such as 203.0.113.0/24, slowing both address exhaustion and the growth of routing tables.
September 1993 · RFC 1519 - The commercial internet Networks
NSFNET is shut down and traffic moves to commercial networks that exchange traffic with each other, the structure the internet still has.
April 1995 · National Science Foundation - HTTP/1.0 Applications
RFC 1945 documents HTTP/1.0: headers, status codes and methods beyond GET. Each request still opens its own TCP connection.
May 1996 · RFC 1945 - HTTP/1.1 Applications
RFC 2068 defines HTTP/1.1, with persistent connections by default and the Host header, which lets many websites share one IP address. RFC 2616 revises it in 1999.
January 1997 · RFC 2068 - Wi-Fi Local links
IEEE publishes 802.11, the first wireless LAN standard in the family later branded Wi-Fi.
1997 · IEEE 802.11 (revision history) - IPv6 Internet and routing
RFC 2460 specifies IPv6, with 128-bit addresses, so that the internet would not run out of them.
December 1998 · RFC 2460 - TLS 1.0 Encryption
RFC 2246 standardises Transport Layer Security, the successor to Netscape’s SSL, which had encrypted web traffic since the mid-1990s.
January 1999 · RFC 2246 - TLS 1.2 Encryption
RFC 5246 defines TLS 1.2, which carried most encrypted web traffic for the next decade. A new connection needs two round trips of handshake before the first request.
August 2008 · RFC 5246 - IPv4 runs out Internet and routing
IANA hands its last free blocks of IPv4 addresses to the five regional internet registries. From here on, networks rely on NAT, address markets and IPv6.
3 February 2011 · ARIN, The IANA IPv4 Address Free Pool is now Depleted - HTTP/2 Applications
RFC 7540 defines HTTP/2: binary frames, many requests multiplexed over one connection, and compressed headers. It grew out of Google’s SPDY.
May 2015 · RFC 7540 - Free certificates Encryption
Let’s Encrypt opens to the public, issuing free, automatically renewed TLS certificates, and HTTPS becomes the default for most sites.
December 2015 · Let’s Encrypt - TLS 1.3 Encryption
RFC 8446 defines TLS 1.3: a one-round-trip handshake, an optional zero-round-trip mode for returning clients, and the removal of old, weak options.
August 2018 · RFC 8446 - DNS over HTTPS Naming
RFC 8484 defines how to send DNS queries inside HTTPS, so that networks on the path cannot read or change them.
October 2018 · RFC 8484 - QUIC Transport
RFC 9000 defines QUIC, a transport built on UDP with TLS 1.3 inside it: one round trip to set up both, streams that do not block each other, and connections that survive a change of network.
May 2021 · RFC 9000 - HTTP/3 Applications
RFC 9114 defines HTTP/3, HTTP over QUIC. The same month RFC 9110 restates HTTP’s semantics separately from any one version.
June 2022 · RFC 9114
1969 to 1983: the ARPANET
The ARPANET was funded by the US Defense Department’s Advanced Research Projects Agency to let research computers share resources. Its key idea was packet switching: instead of reserving a circuit for each conversation, as telephone networks did, messages were cut into packets that travelled independently through small dedicated computers called IMPs (interface message processors), built by BBN. The first IMP was installed at UCLA in September 1969, and in October a computer there sent the first host-to-host message to the Stanford Research Institute. By the end of the year the network joined four sites.
Email arrived in 1972, and quickly became the network’s most popular use. Meanwhile other packet networks appeared, including packet radio and satellite networks, and on single sites Ethernet, which Bob Metcalfe and David Boggs began developing at Xerox PARC in 1973. The ARPANET’s own protocol, NCP, assumed one network that never lost packets. Connecting different networks needed something else.
TCP/IP: a network of networks
In May 1974 Vint Cerf and Bob Kahn published “A Protocol for Packet Network Intercommunication”. Its design choices still define the internet: networks stay independent and are joined by gateways (now called routers); the network only tries its best to deliver packets; and the hosts at each end take care of reliability, retransmitting what is lost and putting data back in order. The protocol was later split in two. IP carries packets between any two addresses, and TCP builds a reliable byte stream on top. UDP (1980) offers IP’s best effort with port numbers, for applications that do not want TCP’s guarantees.
IPv4 and TCP were published as RFC 791 and RFC 793 in 1981, and on 1 January 1983 the whole ARPANET switched over in one flag day. In 1986 the US National Science Foundation built NSFNET to join university supercomputer centres, and it became the backbone that most networks connected to.
The internet’s growth soon exposed a problem: when many TCP connections sent as fast as they could, routers dropped packets, senders retransmitted, and the network spent its capacity on retransmissions. After the first of these congestion collapses in 1986, Van Jacobson added slow start and congestion avoidance to TCP (1988). Every TCP connection still starts slowly and grows its sending rate as acknowledgements come back, which is why the size of a response matters on a page load (see the 14 KB first flight).
Names and routes: DNS and BGP
Early hosts found each other through a single file, HOSTS.TXT, that listed every machine’s name and address and was copied to every host. That could not scale. In November 1983 Paul Mockapetris published the Domain Name System: a hierarchy of name servers in which the root knows who runs each top-level domain such as .com, those servers know who runs each domain, and the domain’s own servers hold its records. Each answer can be cached for as long as its TTL allows. The DNS guide follows one lookup through it.
Routing between networks needed the same kind of decentralisation. With the Border Gateway Protocol (1989), each network, called an autonomous system, tells its neighbours which address ranges it can reach and through which path, and each network decides by its own policy which routes to accept and pass on. No one controls the whole map. CIDR (1993) replaced fixed class A, B and C address blocks with prefixes of any length, which slowed the use of addresses and let routes be aggregated. BGP’s reliance on trust between networks is also its weakness, as the outages below show; the BGP guide covers it in depth.
The World Wide Web
In March 1989 Tim Berners-Lee, at CERN, proposed a system of linked documents for sharing information between physicists. It had three parts that are still the web’s foundation: URLs to name documents, HTML to write them with links, and HTTP to fetch them. The first website, info.cern.ch, ran on his NeXT computer. The first version of HTTP was tiny: the browser sent GET and a path, and the server sent back the HTML and closed the connection.
On 30 April 1993 CERN put the web software in the public domain, and the web spread through the 1990s. In April 1995 NSFNET was shut down and traffic moved to commercial networks, which exchange traffic with each other at internet exchange points and through paid transit, the arrangement that still holds.
HTTP grew to match. HTTP/1.0 (1996) added headers, status codes and content types. HTTP/1.1 (1997) kept connections open for several requests and added the Host header, so that many websites could share one IP address. It carried the web for nearly two decades; the HTTP guide covers its messages in detail.
Running out of addresses
IPv4 addresses are 32 bits long, about 4.3 billion in total, and many ranges are reserved. IPv6 (1998) uses 128-bit addresses, but it is a separate protocol: an IPv4-only host cannot talk to an IPv6-only one, so adoption has been slow and both run side by side. On 3 February 2011 IANA handed out its last free IPv4 blocks to the regional registries.
The internet kept growing thanks to network address translation (NAT): a home router or a carrier shares one public address among many devices by rewriting addresses and ports on the way out. NAT broke the original model in which any host could reach any other directly, and it is part of the reason so much now runs over a few well-known ports and protocols. The NAT guide explains how it works.
Encryption everywhere, and a new transport
Netscape’s SSL encrypted web traffic from the mid-1990s and was standardised as TLS in 1999. For years HTTPS was used mainly for logins and payments. Two things changed that: free, automated certificates from Let’s Encrypt (public since December 2015) and browsers marking plain HTTP pages as not secure. TLS 1.3 (2018) cut the handshake from two round trips to one and removed old, weak options. The HTTPS guide walks through the handshake.
HTTP/2 (2015) sent many requests over one connection at once, in binary frames, with compressed headers. But it still ran over TCP, where one lost packet holds up everything behind it. QUIC (2021) moved the transport into a new protocol on top of UDP, with TLS 1.3 built in: one round trip to set up both, independent streams, and connections that survive a change of network, such as moving from Wi-Fi to mobile data. HTTP/3 (2022) is HTTP over QUIC.
DNS gained encryption too: DNS over HTTPS (2018) and DNS over TLS hide queries from the networks they cross. What has not changed since the 1980s is the core: IP packets, TCP for most traffic, DNS for names and BGP for routes.
What happens when you load a page
Type a URL and press Enter. Before anything appears, the browser has to do the following, and most of it is waiting for messages to cross the network and come back:
- Parse the URL and check its caches. If the page is cached and still fresh, or a service worker answers, the network is never used.
- Look up the name with DNS, unless the address is cached on the device.
- Open a connection: a TCP handshake, then a TLS handshake for HTTPS. HTTP/3 does both in one QUIC handshake. If a connection to the site is already open, all of this is skipped.
- Send the request and wait while the server builds the response.
- Receive the response. A new TCP connection starts slowly, so a large response takes several round trips.
- Render: parse the HTML, fetch the CSS, scripts, fonts and images it refers to (each of which may repeat the steps above for other servers), lay out the page and paint it.
The figure counts the round trips for steps 2 to 5, for one HTML document. Pick a protocol generation, a cache state and a round-trip time; everything else is worked out from the protocols’ rules.
- DNS lookup. One round trip to the recursive resolver, which has the answer cached.
- TCP handshake. SYN, SYN-ACK, ACK: one round trip before any data can be sent.
- TLS handshake. TLS 1.3 needs one round trip.
- Request and first byte. The request travels to the server, the server works for 100 ms, and the first bytes of the response travel back.
- Rest of the response. 50 KB is 36 segments. Slow start sends 10, then waits for acknowledgements before sending twice as many: 2 more round trips.
6 round trips at 50 ms, plus 100 ms of server time: 400 ms before the browser has the whole HTML. Rendering comes after.
| Protocols | First visit | Visited before | Connection already open |
|---|---|---|---|
| HTTP/1.1, TLS 1.2, TCP | 450 ms | 400 ms | 150 ms |
| HTTP/2, TLS 1.3, TCP | 400 ms | 350 ms | 150 ms |
| HTTP/3 over QUIC (TLS 1.3 inside) | 350 ms | 300 ms | 150 ms |
Assumes no packet loss, a link fast enough that bandwidth is not the limit, and 10 segments of 1,460 bytes in TCP’s first flight (RFC 6928). “Visited before” means the browser has a saved TLS session; with TLS 1.3 and QUIC it then sends the request in its first message (0-RTT).
Where the round trips go
Round trips dominate the early part of a page load because each step waits for the previous one: the browser cannot open a connection before it knows the address, or send the request before the handshake finishes. The time of a round trip is set by distance and the networks in between, and light in fibre covers about 200 km per millisecond, so no amount of bandwidth makes a far-away server close.
For a 50 KB HTML document, a 50 ms round-trip time, 100 ms of server time and the DNS answer cached at the resolver, the model gives:
| Protocols | First visit | Round trips | Visited before | Round trips |
|---|---|---|---|---|
| HTTP/1.1, TLS 1.2, TCP | 450 ms | 7 | 400 ms | 6 |
| HTTP/2, TLS 1.3, TCP | 400 ms | 6 | 350 ms | 5 |
| HTTP/3 over QUIC (TLS 1.3 inside) | 350 ms | 5 | 300 ms | 4 |
The handshakes are where the protocol generations differ. TLS 1.2 needs two round trips, TLS 1.3 one, and QUIC folds the transport handshake into its single TLS round trip. On a return visit, TLS 1.3 and QUIC can send the request with the first packet (0-RTT); servers only accept that for requests that are safe to repeat, because early data can be replayed by an attacker. Connection reuse beats all of them: requests on an open connection skip DNS and both handshakes, which is why browsers keep connections open and HTTP/2 and HTTP/3 send every request to a site over one.
The 14 KB first flight
A new TCP connection does not know how much the network can take, so it starts with a small congestion window and doubles it every round trip as acknowledgements arrive. Since RFC 6928 the initial window is 10 segments; at 1,460 bytes of data per segment, that is 14,600 bytes, about 14 KB. A response that fits arrives in the first round trip after the request. Beyond that, the extra round trips grow with the logarithm of the size:
| Response size | Segments | Extra round trips |
|---|---|---|
| 10 KB | 8 | 0 |
| 14 KB | 10 | 0 |
| 15 KB | 11 | 1 |
| 30 KB | 22 | 1 |
| 50 KB | 36 | 2 |
| 100 KB | 71 | 3 |
| 200 KB | 141 | 3 |
| 500 KB | 351 | 5 |
This is why performance guides suggest putting what the first screen needs in the first 14 KB of the HTML. Headers and TLS records take a little of that space, so the real budget is slightly smaller. QUIC uses the same idea of a congestion window that starts small and grows. A connection that is already open has usually grown its window, so later responses on it do not pay this cost again.
After the bytes arrive
The figure stops when the HTML has arrived, but the user sees nothing yet. The browser parses the HTML into the DOM as it streams in and starts fetching the resources it finds: stylesheets, scripts, fonts and images. CSS blocks rendering until it is loaded, because the browser cannot lay out the page without it, and scripts without async or defer pause parsing while they download and run. Resources on other domains need their own DNS lookups and connections, which is why sites preconnect to them or serve them from their own domain.
Once the DOM and the styles are ready, the browser computes styles, lays out every box, paints and composites the result. Google’s Core Web Vitals measure the outcome from the user’s side: Largest Contentful Paint (when the main content appears), Interaction to Next Paint (how quickly the page responds to input) and Cumulative Layout Shift (how much things jump around).
When it breaks
Every layer of the history above has failed in public, usually through one configuration change:
- YouTube, 24 February 2008 (BGP). Pakistan Telecom announced a /24 route inside YouTube’s /22. Its upstream provider passed the route on, and because routers prefer the most specific route, YouTube traffic from much of the internet went to Pakistan for about two hours. YouTube recovered traffic by announcing even more specific routes itself.
- Fastly, 8 June 2021 (CDN). A software bug deployed in May was triggered by a valid configuration change from a customer, and 85% of Fastly’s network returned errors. Within 49 minutes 95% of the network was working again.
- Facebook, 4 October 2021 (BGP and DNS). A command meant to assess backbone capacity disconnected all of Facebook’s data centres. Its DNS servers, unable to reach the data centres, withdrew their BGP routes as designed, so the rest of the internet could no longer find facebook.com, even though the servers were running.
The pattern is the internet’s design showing through: independent networks trust each other’s announcements, and a few large providers carry a large share of traffic.
In interviews
“What happens when you type a URL into a browser and press Enter?” is one of the most common interview questions for web and backend roles, because it can go as deep as the interviewer wants. A good answer goes in order, DNS, TCP, TLS, HTTP request, server, response, render, and then dives into whichever layer the interviewer asks about: the DNS hierarchy and TTLs, the TCP handshake and slow start, the TLS handshake and certificates, HTTP/2 multiplexing, load balancers and CDNs on the server side, or the critical rendering path in the browser. Counting the round trips, as this page does, shows you know where the time goes.
History questions are rarer, but knowing why things are the way they are helps: why IPv4 ran out and what NAT broke, why BGP can be hijacked, why HTTP/3 needed a new transport rather than a better TCP.
Questions and answers
When was the internet invented?
There is no single date. The ARPANET, its forerunner, sent its first message in October 1969. Vint Cerf and Bob Kahn published the design of TCP/IP in 1974, and the ARPANET switched to TCP/IP on 1 January 1983, which is the date most often given for the start of the internet as a network of networks. The World Wide Web, which runs on top of the internet, came later: Tim Berners-Lee proposed it in 1989 and the first website went up in 1991.
What is the difference between the internet and the World Wide Web?
The internet is the global network of networks that carries packets between computers using IP. The World Wide Web is one application that runs over it: pages identified by URLs, linked to each other and fetched with HTTP. Email, video calls and online games also use the internet without being part of the web.
Who invented the internet?
Many people. Vint Cerf and Bob Kahn designed TCP/IP; Leonard Kleinrock’s lab at UCLA sent the first ARPANET message; Paul Mockapetris designed DNS; Bob Metcalfe and David Boggs built Ethernet; Tim Berners-Lee invented the web. The internet was built by research groups and standards bodies rather than one company, and its protocols are published as RFCs that anyone can implement.
What happens when you type a URL into a browser?
The browser finds the server’s IP address with DNS, opens a connection (a TCP handshake, then a TLS handshake for HTTPS; HTTP/3 does both at once over QUIC), sends an HTTP request, waits while the server builds the response, receives the bytes, and then parses the HTML, fetches the CSS, scripts and images it refers to, and renders the page. On a first visit most of the time before the first byte is spent waiting for round trips.
How many round trips does it take to load a web page?
For one HTML document on a first visit over HTTP/2 and TLS 1.3, with the DNS answer cached at the resolver: one round trip for DNS, one for the TCP handshake, one for TLS, one for the request and the first part of the response, plus more if the response is larger than the first TCP flight of about 14 KB. HTTP/3 saves the TCP round trip, and a returning visitor can skip more with session resumption.
Why is HTTP/3 faster than HTTP/2?
HTTP/3 runs over QUIC instead of TCP. QUIC sets up the connection and encryption in one round trip instead of two, can send the request in the very first packet when resuming a session, and loses less time to packet loss because a lost packet only delays the stream it belongs to rather than every stream on the connection.
What is the 14 KB rule?
A new TCP connection may send 10 segments before waiting for an acknowledgement (RFC 6928). With 1,460 bytes of data per segment that is 14,600 bytes, about 14 KB. A response that fits arrives in the first round trip; a larger one needs at least one more, so keeping the HTML needed for the first render under that size can save a full round trip.
When did the internet run out of IPv4 addresses?
On 3 February 2011 IANA allocated its last free blocks of IPv4 addresses to the five regional internet registries, which then ran out of their own pools over the following years. The internet keeps working through network address translation (NAT), the transfer of existing addresses between organisations, and IPv6.
Further reading
- Leiner, Cerf, Clark, Kahn and othersA Brief History of the InternetThe history told by the people who built it.
- Cerf and Kahn, 1974A Protocol for Packet Network IntercommunicationThe paper behind TCP/IP.
- Berners-Lee, 1989Information Management: A ProposalThe proposal that became the web.
- Ilya GrigorikHigh Performance Browser NetworkingLatency, TCP, TLS and HTTP from a page-load point of view; free online.
- RFC 6928Increasing TCP’s Initial WindowWhere the 10-segment first flight comes from.
- SemicolonyHow DNS worksOne lookup from the browser to the root and back.