What Actually Happens When You Type a URL Into Your Browser?
A web address looks like one thing, but a browser has to turn it into a conversation across several systems. Follow a typical navigation from the address bar to the pixels on your screen.
Playground · the first two steps
Your browser knows a name. It needs a place.
Computers find each other using numbers, but people remember names. Before a website can open, your browser has to look up the number that goes with the name you typed. Watch that happen, then try making it go wrong.
Ready
You typed the name shop.example, but it needs the matching number before it can connect. Press Next step and follow the question.
How long it took
259 ms
- Between you and the helper
- Top of the directory
- Ending directory
- The site's own list
Every coloured block is one trip to ask someone. Fewer trips means the page starts loading sooner. A millisecond (ms) is a thousandth of a second.
You can edit this and try any website address.
The parts of an address
- scheme
- httpsHow to talk to the site. https means a private, secure conversation.
- host
- shop.exampleThe site's name. Only this goes to the lookup.
- port
- 8443A door number on the site's computer. Usually hidden.
- path
- /productsWhich page you want, like choosing a room in a building.
- query
- color=greenExtra details for the page, such as a filter or a search.
- fragment
- detailsA spot inside the page. It never goes to any server.
Quick experiments
Words you just met
- DNS
- The internet's directory. It turns names people can remember into numbers computers use.
- IP address
- The number that says where a computer is on the internet, like 192.0.2.5.
- Resolver
- The helper that does the asking on your behalf and remembers answers for a while.
- Cache
- A saved copy kept close by so the same question doesn't need asking twice.
This is a simplified model made for learning. The timings and the 192.0.2.x numbers are examples, but the steps are how the internet really finds a website. The rest of the journey continues in the written walkthrough below.
The whole journey in seven lines
A typical new HTTPS page load. Caches, redirects and parallel work can skip or reorder some of this.
- 01
The browser parses the URL
The browser separates the scheme, host, port, path, query, and fragment.
https://shop.example:8443/products?color=green#details
- 02
DNS finds an address for the host
The host name may be answered from a cache or resolved to one or more IP addresses.
shop.example → A and/or AAAA records
- 03
The browser establishes a secure connection
The browser connects to an address and negotiates a transport and security for HTTPS.
shop.example:8443
- 04
The browser sends an HTTP request
The request carries a method, target, and fields; the fragment is left out.
GET /products?color=green HTTP/1.1 Host: shop.example:8443 Accept: text/html
- 05
A server or intermediary handles the request
A cache, CDN, proxy, or application may handle the request before a response is chosen.
Browser → CDN cache → application → data store
- 06
The response comes back
A status code, response fields, and possibly content tell the browser what happened.
200 OK Content-Type: text/html <!doctype html>…
- 07
The browser builds and renders the page
As HTML arrives, the browser parses it and coordinates style, layout, paint, and more requests.
HTML → document tree + CSS + scripts + images