Skip to the guide

What happens when you type a URL

BeginnerConcept3 pages

"What happens when you type a URL and press Enter?" is one of the oldest interview questions, and it's also the map of this whole section. Each step has its own guide. Here you'll learn the order of the steps, what each one costs, and where a design can make them cheaper.

Visiting an office for the first time

You need to see someone at a company you've never visited. You know its name but not its address, so you look it up and travel there. At the door, a guard lets you in. Inside, you check the sign and the staff badges: this really is the company you meant. A receptionist points you to whichever counter is free, you hand over your form, and you take the answer home. Next time it's quicker: you remember the address, and if you come back the same day, you still have your visitor badge.

In network terms:

  • looking up the address → DNS: turns shop.example.com into an IP address
  • the guard letting you in → TCP handshake: opens a connection
  • checking it's the right company → TLS handshake: proves the server is genuine and agrees encryption keys
  • the receptionist → load balancer (or a CDN edge): picks a server
  • the counters → the app servers behind it
  • the form and the answer → HTTP request and response
  • remembering the address, keeping the badge → DNS caching and connection reuse