Consica Labs

Consica Labs
Chapter 3

What Happens When You Open a Website

The incredible journey of a single click

Suppose you type:

www.consicaacademy.com

and press Enter.

Many things happen in less than a second.

The Process

1

Browser receives website request.

You type the address and the browser takes note.

2

DNS finds the website address.

The name is converted to a numerical IP address.

3

Request travels through the Internet.

Data packets are routed across the network.

4

Server receives request.

The website's server gets your request.

5

Server sends website files.

HTML, CSS, images, and other assets are sent back.

6

Browser displays webpage.

Your browser renders the page for you to see.

All this happens almost instantly.

Interactive Diagram

Launch the interactive diagram to see this in action.

Open Interactive Diagram

The interactive diagram for this chapter shows the full journey of a web request. You will see:

  • A browser icon sending a request arrow to a DNS server icon
  • The DNS server returning an IP address
  • Packets traveling through routers across a network map
  • The server receiving the request and sending back HTML, CSS, and images
  • The browser piecing everything together to display the final page

Tip: Watch the animation a few times. Notice how packets can take different paths to reach the same destination.

How It Works

Imagine you are sending a letter to a friend in another city. Here is how opening a website is just like mailing a letter:

1. You write the address

Typing the URL is like writing your friend's address on an envelope.

2. The post office looks up the address

DNS works like a postal directory that finds exactly where your friend lives.

3. Trucks carry the letter

Routers and cables carry your request across the internet.

4. Your friend sends a reply

The server receives your request and sends the website back to you.


Deeper Dive

When you press Enter, your browser does not magically know where the website lives. It has to look it up using a system called the Domain Name System (DNS).

DNS translates human-friendly names like consicaacademy.com into a numeric IP address like 192.0.2.1. Think of it as the phonebook of the internet.

Once the browser has the IP address, it opens a connection to the server using something called TCP/IP. Your request is broken into small packets, each with a destination label, and sent through routers across the globe. The server then assembles the response and sends it back the same way.

Key takeaway: Every website visit is a conversation between your browser and a remote server, using DNS as the address book and TCP/IP as the delivery service.


Advanced

The full sequence from keystroke to rendered page involves several protocols working in concert:

DNS Resolution

The browser checks its cache, then queries recursive resolvers, root servers, TLD servers, and authoritative nameservers to resolve the domain to an IP.

TCP Handshake

A three-way handshake (SYN, SYN-ACK, ACK) establishes a reliable connection between client and server.

TLS Negotiation

If HTTPS is used (which it almost always is), a TLS handshake encrypts the connection using certificates and asymmetric cryptography.

HTTP Request & Response

The browser sends an HTTP GET request. The server responds with status codes (200 OK, 404 Not Found, etc.) and the requested resources.

Rendering

The browser parses HTML, builds the DOM tree, fetches CSS and JavaScript, constructs the CSSOM, and executes scripts to paint the final page.

Vocabulary Table

Term Definition
URLUniform Resource Locator; the web address you type into the browser.
DNSDomain Name System; translates domain names into IP addresses.
IP AddressA unique numeric label assigned to every device on a network.
TCP/IPTransmission Control Protocol / Internet Protocol; the rules for data transmission.
PacketA small chunk of data sent over a network.
RouterA device that directs data packets between networks.
HTTP / HTTPSHyperText Transfer Protocol (Secure); the protocol for transferring web pages.
ServerA computer that stores and delivers website files.
CacheA temporary storage location that speeds up repeated requests.
TLS / SSLEncryption protocols that secure data in transit.

Fun Facts

Lightning Speed

A DNS query can complete in as little as 10–20 milliseconds, faster than you can blink.

Global DNS System

There are over 1,000 root DNS servers distributed worldwide, handling billions of queries daily.

Packet Pizza

A single web page may be delivered as hundreds of separate packets, each taking a different route.

First Website

The first website ever (info.cern.ch) went live on August 6, 1991. It was just a single page with text.

Google's Speed

Google processes over 99,000 search queries every second, each triggering the full request-response cycle.

Common Misconceptions

Q: Is typing "www" necessary?

A: Not really. "www" is just a subdomain. Most websites work fine without it. It is a tradition from the early web.

Q: Does the internet have a single "master switch"?

A: No. The internet is designed to survive failures. There is no single point of failure. It is a distributed network.

Q: Does the browser download an entire website at once?

A: No. It downloads resources as needed. Images, scripts, and stylesheets are fetched one by one, often in parallel.

Q: Is HTTPS completely unbreakable?

A: HTTPS makes eavesdropping extremely difficult, but no system is 100% unbreakable. It protects against casual snooping, not nation-state attacks.

Knowledge Check

1. What does DNS stand for?

A) Direct Network Service

B) Domain Name System

C) Digital Network Standard

D) Data Name Server

Answer: B

2. What is the first step when you type a URL and press Enter?

A) Server sends website files

B) DNS finds the IP address

C) The browser displays the page

D) The request travels through the Internet

Answer: B

3. What protocol ensures data is encrypted between browser and server?

A) HTTP

B) FTP

C) TLS / SSL

D) SMTP

Answer: C

4. True or False: The Internet has a single master switch that controls everything.

Answer: False

5. True or False: Once your browser gets the IP address, it can directly connect to the server.

Answer: True (after establishing a TCP connection and TLS handshake for HTTPS)

6. Matching: Connect each term to its description.

DNS → Translates domain names to IP addresses

HTTP → Protocol for transferring web pages

Router → Directs data packets between networks

Packet → A small chunk of data sent over a network

7. Fill in the blank: The browser sends an HTTP ____ request to ask for a webpage.

Answer: GET

8. Fill in the blank: The ____ translates domain names into IP addresses.

Answer: DNS (Domain Name System)

Critical Thinking

1. What would happen if all DNS servers stopped working?

Think about how you would reach websites without knowing their IP addresses. Could you still access any sites? Which ones?

2. Why do you think data is broken into packets instead of being sent as one large file?

Consider what happens if a connection drops mid-transfer. How do packets make the internet more reliable?

3. How would the web be different if there was no encryption (HTTPS)?

Think about online banking, shopping, and private messages. What information could be intercepted?

Mini Projects

Project 1: Trace the Route

Open a terminal / command prompt on your computer. Type tracert consicaacademy.com (Windows) or traceroute consicaacademy.com (Mac/Linux). Observe how many hops it takes to reach the server. Write down the IP addresses you see along the way.

Project 2: Packet Detective

Open your browser's developer tools (F12) and go to the Network tab. Visit any website. Watch the list of requests appear. How many individual files (HTML, CSS, JS, images) are loaded for a single page? Identify which ones came from the same server.

Teacher Notes

Learning Objectives

  • • Understand the sequence of events when a URL is requested
  • • Explain the role of DNS in translating domain names to IP addresses
  • • Describe how data travels across networks in packets
  • • Distinguish between HTTP and HTTPS

Preparation Needed

  • • Ensure traceroute/tracert is available on student computers
  • • Prepare a slide showing the DNS hierarchy (root, TLD, authoritative)
  • • Have a simple network diagram ready for the packet routing discussion
  • • Test browser developer tools on a few common sites in advance

Discussion Prompts

  • • "What would the internet be like without DNS?"
  • • "Why does your browser cache DNS results? What are the tradeoffs?"
  • • "How do you think loading a webpage today compares to loading one in 1995?"
  • • "What could cause a packet to be lost, and how does TCP handle that?"