Quick Reference
IP Address
Unique device address on internet
DNS
Converts "google.com" → IP address
HTTP
Language browsers use to talk to servers
HTTPS
Secure, encrypted HTTP
TCP
Ensures data arrives correctly
Domain
Human-readable website name

Internet Fundamentals

The Complete Guide to How the Web Works

What You'll Learn
  • How your computer talks to websites
  • Why "www.google.com" works (DNS explained simply)
  • The difference between HTTP and HTTPS
  • How data travels across the internet
  • Practical tools every developer should know
TCP/IP DNS HTTPS HTTP

How the Internet Works

The internet is a network of networks — millions of private, public, academic, business, and government networks connected together.

Internet Architecture Flow

YOUR DEVICE Browser/App/Phone
ISP NETWORK Router/Modem
INTERNET BACKBONE Servers Worldwide
Requests & Responses via HTTP/HTTPS
Key Insight

Every action you take online — clicking a link, sending a message, streaming a video — follows this path. Understanding this flow helps you debug connectivity issues and optimize performance.

Beginner Tip: URL Breakdown

When you type https://www.google.com/search, here's what each part means:

  • https:// = Protocol (secure)
  • www = Subdomain (optional)
  • google.com = Domain name
  • /search = Path to specific page

Data Journey Visualization

1. You type a URL

Your browser prepares an HTTP request

2. DNS Lookup

Domain name converted to IP address (20-120ms)

3. TCP Connection

Three-way handshake established

4. HTTP Request Sent

Data travels through routers to destination server

5. Server Processes

Server generates response (HTML, JSON, etc.)

6. Response Received

Browser renders the content

TCP/IP Protocol Stack

Think of this as the postal system of the internet — structured layers that handle different aspects of communication.

4-Layer TCP/IP Model

4
Application Layer

HTTP, FTP, SMTP, DNS — Data interpretation for applications

3
Transport Layer

TCP, UDP — Reliable delivery and error checking

2
Internet Layer

IP (IPv4/IPv6) — Addressing and routing packets

1
Network Access

Ethernet, WiFi — Physical connection and hardware

IP Address Types
IPv4 192.168.1.1
IPv6 2001:0db8:85a3::8a2e
IPv4 has 4 billion addresses (running out!). IPv6 has 340 undecillion.
TCP Reliability
  • Guaranteed delivery
  • In-order sequencing
  • Error detection
  • Retransmission of lost packets

DNS (Domain Name System)

DNS is the phone book of the internet — translating human-readable domain names into machine-readable IP addresses.

DNS Resolution Process

What happens when you type "google.com"

1
Browser Cache Check

Have you visited this site recently?

2
OS Cache & Hosts File

Operating system checks its DNS cache

3
DNS Resolver (ISP)

Queries recursive resolver (usually your ISP)

4
Root Server → TLD Server

Root points to .com TLD server

5
Authoritative DNS

Google's DNS provides the IP address

Connection Established

Browser connects to 142.250.80.46 (20-120ms total)

DNS Records for Developers
A Record IPv4 address
AAAA IPv6 address
CNAME Domain alias
MX Mail server
TXT Verification
NS Name servers

HTTP & HTTPS

The language that browsers and servers use to communicate.

HTTP Request/Response Cycle

CLIENT
GET /index.html HTTP/1.1 Host: www.example.com User-Agent: Mozilla/5.0 Accept: text/html
Request Response
SERVER
HTTP/1.1 200 OK Content-Type: text/html Content-Length: 1234 <html>...</html>
HTTP Methods (CRUD)
Method Action Use Case
GET Read Load page
POST Create Submit form
PUT Update Replace data
PATCH Partial Modify field
DELETE Remove Delete item
HTTP Status Codes
200 OK 201 Created 301 Moved 304 Not Modified 400 Bad Request 401 Unauthorized 403 Forbidden 404 Not Found 429 Too Many 500 Error 502 Bad Gateway 503 Unavailable

HTTPS Encryption

HTTPS adds a layer of security using TLS/SSL encryption.

HTTP (Insecure)

Data travels as plain text — anyone can intercept and read

HTTPS (Secure)

Data is encrypted — uses public/private key encryption

TLS Handshake Process

1. Client Hello

Browser requests secure connection, sends supported cipher suites

2. Server Response

Server sends SSL certificate containing public key

3. Verification

Browser verifies certificate with Certificate Authority (CA)

4. Key Exchange

Browser generates session key, encrypts with public key

5. Secure Session

Server decrypts with private key, both use session key for symmetric encryption

Try It Yourself

Practice what you learned! Open your terminal/command prompt and try these commands:

1. Ping a website (test connectivity)
ping google.com You should see replies with the IP address
2. DNS Lookup (find IP)
nslookup google.com See the IP addresses associated with a domain
3. Trace the route
tracert google.com Watch your request hop across servers worldwide
4. Check your IP
ipconfig See your device's IP address (Windows)
Browser DevTools (Most Important!)

Press F12 or Ctrl+Shift+I to open Developer Tools. Click the Network tab and refresh any page — you'll see every HTTP request your browser makes!

Client-Server Architecture

The fundamental pattern behind all web applications.

Traditional vs Modern Architecture

Client (Frontend)
  • Browser renders HTML/CSS/JS
  • Handles user input
  • Makes API calls
  • Stores local data
Thin Client
Server (Backend)
  • Receives requests
  • Processes business logic
  • Queries database
  • Returns JSON/HTML
Heavy Lifter
Database
  • Persistent storage
  • Data relationships
  • Query optimization
  • Backup & recovery
Data Layer
Modern Hosting Options
Static Sites
GitHub Pages Vercel Netlify
Full Stack
Railway Render AWS
Databases
MongoDB Atlas Supabase PlanetScale

Essential Developer Tools

Tool Purpose Example Command
ping Test connectivity ping google.com
traceroute See network path traceroute google.com
curl Make HTTP requests curl -I https://api.example.com
nslookup DNS lookup nslookup google.com
netstat Check connections netstat -an
DevTools Debug everything Press F12

Common Beginner Mistakes

Mistake: HTTP = HTTPS

Many beginners think they're the same. HTTP sends data as plain text (anyone can read it), while HTTPS encrypts it (secure).

Mistake: DNS = DHCP

DNS maps domain names to IPs. DHCP assigns IPs to devices on your network. Different things!

Mistake: IP = Domain

IP address is a number (like 142.250.80.46). Domain is a name (like google.com). DNS bridges them.

Mistake: HTTP Methods = SQL

HTTP GET/POST/PUT/DELETE are not the same as SQL SELECT/INSERT/UPDATE/DELETE. HTTP is about requests, SQL is about database operations.

Key Concepts Summary

Concept Analogy Why It Matters
IP Address Home address for devices Server locations, geolocation services
DNS Phone book for websites Debugging loading issues, domain config
TCP Certified mail with tracking WebSockets, API reliability
HTTP Language of web communication REST API design, error handling
HTTPS/TLS Sealed envelope with ID check Security, SEO ranking, user trust
Client-Server Restaurant (you/kitchen) Architecture decisions, performance
Home Next: HTML5