Watch on Instagram

Network Bytes · Episode 7 · CCNA 1.5

What happens when you type a URL?

You type a web address and press Enter. Here are the six steps that happen before the page appears, often in well under a second.

Posted · About a 1 minute watch, 2 minute read · Take the quiz

Steps 1 and 2: find the server, then say hello

Your computer can't use a name like example.com to reach a website. It needs the server's IP address, so it first asks DNS, the internet's contacts list: "what's the address for example.com?" DNS answers with a number, such as 203.0.113.10.

Next, your computer and that server do the TCP three-way handshake: your computer sends SYN, the server answers SYN-ACK, and your computer replies ACK. Now both sides know the other is there and ready to talk.

Step 3: lock the connection

If the address starts with https://, the two sides then do a TLS handshake. They check that the server is really who it says it is and agree on secret keys. From then on, everything they send is scrambled, so anyone in between (on public Wi-Fi, for example) sees only gibberish. That's what the little padlock in your browser bar means.

Steps 4 to 6: ask, receive, draw

With a safe connection open, your browser sends an HTTP request, basically "please send me this page." The simplest one is GET /, which asks for the site's home page.

The server answers with the page as code: HTML that describes what's on the page. Your browser reads that code, notices it also needs pictures and style sheets (CSS), asks for those too, and then renders the page: it works out where every heading, image and paragraph goes and draws them on your screen.

Try it yourself

Open any website, then open your browser's developer tools (F12 on Windows, Option+Command+I on a Mac) and click the Network tab. Reload the page. Every line is one request: the first is the page's HTML, and the rest are the pictures, styles and scripts the browser fetched after reading it. Click the padlock in the address bar to see the site's certificate from step 3.

Good to know

  • This is a simplified overview. Steps can be skipped or combined: if your computer already has the DNS answer saved (cached), step 1 is skipped.
  • Newer sites using HTTP/3 run over QUIC (on UDP), which merges the handshake and the encryption setup into one step.
  • Each step gets its own episode, and the long-form video goes through them one by one.

For CCNA learners

This ties together CCNA 200-301 exam topics 1.5, compare TCP to UDP (the three-way handshake) and 4.3, explain the role of DHCP and DNS: be able to put DNS resolution, the TCP handshake and the application request in order.

Test your knowledge

Quick quiz: What happens when you type a URL?

4 multiple-choice questions. Pick one answer for each, then check how you did.

1What is the first thing your computer does after you press Enter on a new address?
2What are the three messages in the TCP three-way handshake, in order?
3What does the padlock in your browser bar tell you?
4What does the server send back when your browser asks for a page?

Sources

Video transcript

You type a web address and press Enter. Six things happen before you can blink.

One: your computer asks DNS for the site's IP address. Two: it does the three-way handshake with that server, to make sure both sides are ready.

Three: for a site that starts with HTTPS, they agree on a secret key, so nobody in between can read your data. That's the little padlock in your browser bar. Four: your browser sends a request, basically "please send me this page."

Five: the server sends the page back as code. Six: your browser reads that code, fetches the pictures and styles it needs, and draws the page on your screen.

Six steps, often in well under a second. Every single time.

More from Network Bytes

All Network Bytes lessons