5 min
  • DNS
  • HTTP
  • HTTPS

What happens when you open a website?

What happens between pressing Enter and seeing the page?

You type a web address, such as www.example.com. Your browser, the app you open websites with, now has work to do. The page lives on a server: a computer somewhere else that answers when asked.

Before the browser can ask, four things happen, in order.

  1. Find the server. The name is for people. Computers send messages to a number, so the browser looks up the site's IP address.
  2. Connect. The browser opens a connection, so both ends know the other is listening.
  3. Lock the connection. With HTTPS, the browser checks the site's ID and agrees a secret with it.
  4. Ask for the page. Only now does the browser send its request. The page comes back, and the browser draws it.

Press play to watch all four for a site this browser has never visited.

Loading the Internet Simulator simulation…

The page itself arrives only near the end of the run. Everything before it is the work of getting ready to ask. That is why a site is slowest the first time you visit it: nothing has been looked up yet.

The page is rarely the last thing, either. The browser reads it and finds that it needs pictures and styles too. It asks for each of those in the same way.

Check yourself
You open a website you have never visited before. What does your browser do first?

The rest of this track takes these steps one at a time. It starts with the devices in your own home.

Key takeaways

  • A website lives on a server. Your browser has to find it, connect to it and ask it for each page.
  • First the browser looks up the site’s IP address. Then it opens a connection and, for HTTPS, locks it.
  • Most of a first visit is spent getting ready to ask, not receiving the page.

Take it further