Skip to content

What happens when you open a website

From typing a name to seeing a page: how a name becomes an address, how your browser reaches the server, and what comes back.

Step through it

Step 1 of 7

You enter a name

You type example.com or click a link. Your browser needs a number, an IP address, to know where to send its request. It first checks whether it already knows the answer from a recent visit.

Path: You

Read: What is an IP address?

Tip: swipe, or use the left and right arrow keys, to turn the slides.

Step 1 of 7: You enter a name

See the whole path at once
  1. YouYour browser
  2. Your routerHome or office network
  3. DNS resolverLooks up names
  4. Name serversHold the domain's records
  5. Website serverHolds the page
Read every step as text
  1. 1.You enter a name

    You type example.com or click a link. Your browser needs a number, an IP address, to know where to send its request. It first checks whether it already knows the answer from a recent visit.

    Path: You

    Read: What is an IP address?

  2. 2.The browser asks a DNS resolver

    If it does not know, your device asks a DNS resolver, usually run by your internet provider or a public service such as Cloudflare, Google or Quad9. The request leaves your device through your router.

    Path: You to Your router to DNS resolver

    Read: DNS records explainedTry: Compare three resolvers yourself

  3. 3.The resolver finds the answer

    If the resolver has no recent answer, it asks the domain's own name servers, which hold the official records. The answer, such as an A or AAAA record, comes back with a TTL that says how long it may be kept.

    Path: DNS resolver to Name servers

    Read: DNS records explained

  4. 4.The address comes back

    The resolver passes the address to your browser and keeps a copy until the TTL runs out. That is why a changed record can take a while to show up everywhere.

    Path: Name servers to DNS resolver to Your router to You

    Read: DNS records explained

  5. 5.Your browser connects to the server

    Your browser opens a connection to that address. Your device has a private address, so your router swaps in its own public address for the trip and remembers who asked, so it can pass the reply back. This is called NAT.

    Path: You to Your router to Website server

    Read: Public and private IP addresses

  6. 6.A secure connection is set up

    For an https address, the browser and the server first agree on encryption, and the server shows a certificate. The browser checks that the certificate is valid for this name. Only then is anything private sent.

    Path: You to Website server

  7. 7.The page comes back

    The server sends the page. Your router hands it to your device and the browser draws it, often asking for more files such as images and scripts. Each of those repeats the last two steps.

    Path: Website server to Your router to You

    Read: What is an IP address?Try: See the address the website saw

Go deeper