What Happens When You Visit a Website
Follow a request from your browser to a distant server and back.
What Happens When You Visit a Website is a free Network+ Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Network+ Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
A Simple Click, A Big Journey
Visiting a website feels instant, but a lot happens in that split second. Let's follow one request from your browser to a distant server and back.
Step 1: Resolving the Name
First, your device asks the Domain Name System (DNS) to turn the web address you typed into a numeric IP address. If this lookup fails, the page will not load.
Step 2: Starting a Connection
Knowing the IP, your browser opens a connection using TCP. A quick handshake makes sure both sides are ready before any data flows. The code shows it.
Client -> SYN -> Server
Client <- SYN/ACK <- Server
Client -> ACK -> ServerStep 3: Securing the Channel
Most sites use HTTPS, adding encryption with TLS. A handshake exchanges keys so your data is scrambled to anyone watching — that is the padlock. 🔒
Step 4: Sending the Request
Now your browser sends an HTTP request asking for a specific page. HTTP defines how the browser asks and how the server will answer.
Step 5: Crossing the Internet
Your request does not jump straight there. It is split into packets that hop through many routers, each forwarding them closer to the server.
Step 6: The Server Responds
The server gets the request, finds or builds the page, and sends back an HTTP response with a status code (like 200 for success) and the content.
Step 7: Rendering the Page
Your browser reassembles the packets and starts rendering the page, then fetches extra files like images and scripts. One request was really many.
Caching Saves Time
To speed things up, results are cached — stored temporarily. Your browser reuses images, DNS answers stick around, and copies live closer to you.
When Steps Fail
Each step can fail its own way: a DNS error, a connection timeout, a 404 (not found), or a 500 (server error). The steps tell you where it broke.
The Full Round Trip
The full trip: DNS resolves the name, TCP connects, TLS secures it, an HTTP request routes to the server, and the browser renders the reply — all in under a second.
Quick Check
What is the first step when you visit a website by name?
Recap
Visiting a site runs clear steps: DNS resolves the name, TCP connects, TLS secures it, an HTTP request routes through routers, and the page renders.
Frequently asked questions
Is the “What Happens When You Visit a Website” lesson free?
Yes — the full text of “What Happens When You Visit a Website” is free to read here on the web, and the Network+ Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Network+ Academy course, upgrade to CoddyKit PRO.
What will I learn in “What Happens When You Visit a Website”?
Follow a request from your browser to a distant server and back. You practise Network+ Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Network+ Academy?
No prior experience is required. Network+ Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “What Happens When You Visit a Website” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Network+ Academy lesson?
Yes. Every Network+ Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- The Internet as a Network of Networks
- What Happens When You Visit a Website
- Internet Service Providers and Backbones
- Bandwidth, Throughput, and Latency Basics