SaaS100 Studio
Under the Hood

What Happens When You Type a URL Into Your Browser?

Loading a web page is a relay race between a dozen systems that have never met. Each handover explains an error message you have already seen.

SaaS100 Insights · 15 November 2026 · 9 min

One second, seven handovers

You type an address, press Enter, and a page appears. The whole thing takes about as long as a blink and a half.

In that time, your request has been translated into a number, has set up a guaranteed line to a computer that may be on another continent, has proved to you that the computer is who it claims to be, has agreed a secret code with it, has asked a question, has received an answer in pieces, and has been turned from plain text into a picture on your screen.

None of the systems involved were built by the same people. Most were designed decades apart. They cooperate because each one keeps a small, strict promise to the next.

This is one of the oldest interview questions in software, because the honest answer can be as shallow or as deep as you like. Here is a version that goes deep enough to be useful. As a bonus, it will explain nearly every error page you have ever seen.

What happens when you type a URL: seven handovers

Figure 1. The seven handovers, each with the failure you would recognise. Simplified: repeat visits skip steps thanks to caching.

Step 1: The browser reads the address

Take https://www.example.com/pricing. To you it is one thing. To the browser it is three instructions.

  • https is how to talk: securely.
  • www.example.com is who to talk to.
  • /pricing is what to ask for.

If you typed something that is not an address at all, such as "best pizza near me", the browser hands it to your search engine instead. That decision happens before anything leaves your computer.

Step 2: Finding the number (DNS)

Computers on the internet do not find each other by name. They use numbers called IP addresses. Names exist for humans. So the first job is translation, done by the Domain Name System, or DNS. Amazon's documentation describes it as working "much like a phone book".

A better picture is a chain of referrals. Your browser asks a resolver, usually run by your internet provider. The resolver does not know the answer either, so it asks around on your behalf.

How a DNS lookup works

Figure 2. One question, three referrals. After MDN and AWS documentation.

Think of asking for someone's phone number in a large company. Reception does not know it, but knows which department to ask. The department does not know it, but knows the team. The team has the number. Nobody in the chain holds the whole directory, which is why the system can cover the entire internet without any single list of everything.

Where that analogy stops: the answer is then remembered, at several levels, for a period the site's owner chooses. Your browser keeps it. Your computer keeps it. The resolver keeps it. That is why this step is usually instant on a second visit, and also why, when a company moves its website, some people see the old one for hours.

When it fails: "This site can't be reached." A DNS failure is why, now and then, a large part of the internet seems to vanish at once. The sites are fine. The directory is not answering.

Step 3: Opening a line (TCP)

Now the browser knows where to go. Before it says anything meaningful, it sets up a connection using a protocol called TCP, with a brief exchange known as the three-way handshake:

  1. Browser: "Can we talk?"
  2. Server: "Yes. Can you hear me?"
  3. Browser: "Yes."

It sounds ceremonial, but it does a real job. The internet delivers data in small packets that can arrive out of order, arrive twice, or not arrive. TCP numbers them, checks them off, and asks again for any that go missing. The handshake is how both sides agree where the numbering starts.

When it fails: the tab spins, then gives up. "Connection timed out."

Step 4: Locking it (TLS)

That s in https triggers a second handshake, called TLS. In Mozilla's description, it "determines which cipher is used to encrypt the communication, verifies the server, and establishes that a secure connection is in place".

Two separate things are happening.

Identity. The server presents a certificate, a digital ID issued by an organisation your browser already trusts. This is how you know you are talking to your bank, and not to someone sitting between you and your bank.

Secrecy. The two sides agree on a key to scramble everything that follows. They do this in the open, in a way that leaves an eavesdropper unable to work the key out. It is one of the cleverest ideas in computing, and you use it hundreds of times a day.

After this, the coffee shop wifi, your internet provider, and everyone else along the route can see that you are talking to a site, but not what you are saying.

When it fails: "Your connection is not private." Usually an expired certificate. Occasionally something worse, which is why browsers make that warning hard to click past.

Step 5 and 6: The question and the answer

Only now does the browser send what it wanted to say all along:

GET /pricing

The server receives it and gets to work. For a simple page it reads a file. For most modern sites it runs code, asks a database a few questions, assembles the result, and sends back a status code and a page of HTML, the text format that describes a web page.

The moment the first piece of that response arrives has a name: Time to First Byte. Everything up to here is waiting. Google's guidance is that a good site gets the first byte back within 0.8 seconds.

When it fails: the three-digit codes. 404 if the page does not exist. 500 if the server's own code broke.

Step 7: Turning text into a picture

The HTML that arrives is not a page. It is a description of one, and often a description with many loose ends: "the styles are in this other file, the fonts are over there, here are eleven images and four scripts".

So the browser starts again, many times over, fetching each of those. And because they may live on other servers, each new hostname can mean a fresh DNS lookup and a fresh handshake. Mozilla's guide makes the point directly: "If your fonts, images, scripts, ads, and metrics all have different hostnames, a DNS lookup is needed for each one."

Meanwhile it builds the page in stages. It turns the HTML into a tree of elements. It works out which style rules apply to each. It calculates where everything goes, a step called layout. Then it paints the pixels.

This is why pages sometimes jump as they load. An image arrives late, the browser discovers it is taller than expected, and everything below it moves. It is also why a "fast server" can still produce a slow site.

Where the time actually goes

Where the time goes in a page load

Figure 3. Segment sizes are illustrative, not measurements. The two markers are Google's published "good" thresholds.

People tend to imagine that the journey across the world is the slow part. Mostly it is not. On a decent connection, finding the address and setting up the secure line are thin slices. The larger slices are the server working out its answer and, above all, your own device assembling the page.

That reframes most "why is our site slow?" conversations. Google's targets are a first byte within 0.8 seconds and the main content visible within 2.5 seconds. If you miss the first, look at the server and the database. If you hit the first and miss the second, the problem is what you are sending: too much script, oversized images, too many third parties.

The other side: what this account leaves out

We have described the classic path, and reality has moved on in several places.

  • Caching skips steps. On a repeat visit your browser may already hold the address, an open connection, and most of the files.
  • You are probably not talking to the real server. Most large sites sit behind a content delivery network, which keeps copies in data centres near you. The "server" in step 6 may be a few kilometres away.
  • The handshakes are merging. A newer protocol called QUIC, which underlies HTTP/3, runs over a different transport and combines the connection and encryption setup, so fewer round trips are needed.
  • Many pages are mostly program. In a web app, the first response may be a nearly empty page plus a large script that then builds the interface and fetches its data through APIs.

The seven steps are still the right mental model. Each optimisation above is a way of doing one of them sooner, closer, or less often.

The SaaS100 perspective

This section is our analysis, not established fact.

We find this sequence most useful as a diagnostic tool. When something is wrong with a website, asking "which handover failed?" gets to the cause faster than staring at the symptom.

It also changes where teams spend effort. In our experience of building for the web, the cheapest speed improvements are almost never exotic. They are these:

  1. Send less. Smaller images, fewer scripts, fewer fonts. Step 7 is where most of the time goes.
  2. Use fewer hostnames. Every third-party widget adds lookups and handshakes for every visitor.
  3. Put a CDN in front. Shortening the physical distance speeds up steps 2 to 6 at once.
  4. Fix the slow query. If the first byte is late, one database question is usually to blame.

For a business, none of this is academic. A page that takes several seconds on a mid-range phone on a mobile network is the experience many of your customers actually have, whatever it looks like on the office wifi.

What to take away

A web address is a request for a small miracle of coordination: a directory lookup, a guaranteed line, a proof of identity, a secret code, a question, an answer, and a drawing.

It works because every layer does one job and trusts the others to do theirs. And when it does not work, the error message is telling you, quite precisely, which runner dropped the baton.

Quick questions

What is the difference between HTTP and HTTPS? HTTPS is HTTP with step 4 added: the server's identity is checked and the conversation is encrypted.

Why does a site work for me but not for my colleague? Often caching. One of you has an older remembered answer from step 2, or an older copy of a file from step 7.

Does a VPN change any of this? It adds a stop. Your traffic goes to the VPN's server first, inside an extra layer of encryption, and the seven steps happen from there.

Sources and further reading

  1. MDN Web Docs, "Populating the page: how browsers work". Source for the DNS, TCP, TLS, first byte, and rendering descriptions. https://developer.mozilla.org/en-US/docs/Web/Performance/Guides/How_browsers_work
  2. Amazon Web Services, "What is DNS?" Source for the phone book description and the resolver, root, and name server sequence. https://aws.amazon.com/route53/what-is-dns/
  3. MDN Web Docs, "TCP handshake". https://developer.mozilla.org/en-US/docs/Glossary/TCP_handshake
  4. MDN Web Docs, "QUIC". https://developer.mozilla.org/en-US/docs/Glossary/QUIC
  5. web.dev (Google), "Time to First Byte (TTFB)". Source for the 0.8 second threshold. https://web.dev/articles/ttfb
  6. web.dev (Google), "Largest Contentful Paint (LCP)". Source for the 2.5 second threshold. https://web.dev/articles/lcp

Disclosure: the timings in Figure 3 are illustrative. The handshake dialogue is a plain-language paraphrase of the protocol.


Have a site or product that feels slower than it should? Talk to SaaS100 Studio.