Learn › Explainers › What happens when you type a web address
What happens when you type a web address
In under a second, your browser looks up an address, opens a secure connection, asks for a page and draws it. Here is what happens behind the scenes.
You type termdle.com and press Enter. Within a fraction of a second a page appears. Behind that simple action is a chain of steps involving several computers across the world.
1. Looking in local memory
Your browser first checks whether it already has what it needs. It may have the site's address stored from a recent visit, or even a saved copy of the page. If so, some of the following steps are skipped, which is why a site you visit often loads faster.
2. DNS: turning a name into a number
Computers on the internet find each other with numeric addresses called IP addresses, such as 199.36.158.100. Humans prefer names. The Domain Name System (DNS) is the global directory that translates one into the other. Your device asks a resolver, often run by your internet provider or a public service, which may already know the answer. If not, it asks a chain of servers: first one that knows who runs the .com names, then the one that knows the specific domain. The answer comes back, usually in milliseconds, and is stored for a while so it does not need to be asked again.
3. Opening a connection
With the IP address in hand, your browser contacts that machine. For most websites it uses TCP, a protocol that makes sure data arrives complete and in order. It begins with a short exchange known as a handshake: your device says hello, the server answers, and your device confirms. Newer versions of the web protocol, HTTP/3, use a different transport called QUIC over UDP, which can set up the connection faster.
4. Making it private with TLS
When the address starts with https, the connection is encrypted using TLS. The server presents a certificate that proves it really is the site you asked for, signed by an organisation your browser trusts. Your browser and the server then agree on secret keys that only they know. After this, anyone watching the network sees scrambled data rather than the contents of your page or the details you type.
5. Asking for the page
Now your browser sends an HTTP request, which is a short text message that says, in effect, please send me this page. The server replies with a status code, such as 200 for success or 404 for not found, and the content of the page, usually HTML. Large sites often use a content delivery network (CDN), which keeps copies of pages on servers around the world so the answer comes from somewhere close to you.
6. Building the page
HTML is only the skeleton. As the browser reads it, it discovers other files it needs: style sheets that control how the page looks, scripts that make it interactive, fonts and images. It requests these, often several at the same time, and assembles everything into what you see. This process is called rendering. Scripts may then request more data in the background, for example to load a game's data or a leaderboard.
Why it sometimes feels slow
Each step takes a little time, and delays add up. Distance to the server, a slow network, large images, too many scripts or a busy server can all slow things down. Developers use caching, compression, CDNs and smaller files to shave off milliseconds, because people notice when a page takes more than a couple of seconds.
The short version
- The browser looks for stored copies.
- DNS turns the name into an IP address.
- A connection is opened.
- TLS encrypts it.
- The browser requests the page.
- The browser loads the extra files and draws the page.