# How the Internet and the Web Work

> Understand what happens between typing a URL and seeing a page: DNS, IP, TCP, TLS, servers and browsers. Free notes, key concepts, resources and a mini project.

Canonical: https://www.internhack.in/roadmaps/tracks/full-stack/how-the-internet-works
Last updated: 2026-11-28

Understand what happens between typing a URL and seeing a page: DNS, IP, TCP, TLS, servers and browsers.

Beginner · about 4 hours · difficulty 1/5

A full-stack developer owns both ends of a request, so you need a clear mental model of the path in between. When you open your college placement portal, your browser asks **DNS** for the server's IP address, opens a **TCP** connection, negotiates **TLS** for HTTPS, sends an HTTP request and renders the HTML, CSS and JavaScript it gets back.

### The pieces

- **IP addresses and ports**: every server has an address; port 443 is HTTPS, 80 is HTTP, 5432 is PostgreSQL.
- **DNS**: turns names like example.com into IP addresses. Records such as A, CNAME and TXT are what you edit when you attach a domain to Vercel or Render.
- **TCP and TLS**: reliable delivery plus encryption. The padlock in the browser means TLS succeeded.
- **Clients and servers**: the browser is a client; your Node.js app, database and CDN are servers.
- **CDNs**: copies of static files kept close to users, so a student in Chennai does not wait for a server in Virginia.

### Why it matters for you

Most "my deploy is broken" bugs are actually DNS not propagated, a wrong port, mixed HTTP and HTTPS content, or a CORS rule. Knowing the path lets you debug calmly instead of guessing.

### Pitfalls

- Thinking "the cloud" is magic. It is someone else's computers, reached by the same protocols.
- Ignoring latency. Every round trip costs time, especially on Indian mobile networks.

You are ready to move on when you can explain, step by step, what happens after you press Enter on a URL, and point to where a slow or failed load could break.

## Key concepts

- **IP addresses and ports**
- **DNS and record types**
- **TCP and TLS basics**
- **Client-server model**
- **Browsers and rendering**
- **CDNs and edge networks**
- **Latency and bandwidth**

## Mini project

Use your browser's Network tab and the dig or nslookup command to trace one visit to a site you use daily. Write a one-page diagram of DNS lookup, connection, request and response with real timings.

## Check yourself

A site works on your laptop's Wi-Fi but not on mobile data right after you changed its DNS records. What is the most likely reason?

## Free resources

- [How does the Internet work?](https://developer.mozilla.org/en-US/docs/Learn_web_development/Howto/Web_mechanics/How_does_the_Internet_work) (MDN)
- [Cloudflare Learning Center](https://www.cloudflare.com/learning/) (Cloudflare)
- [Full Stack Developer Roadmap](https://roadmap.sh/full-stack) (roadmap.sh)

Next: [HTTP, Requests and Responses](https://www.internhack.in/roadmaps/tracks/full-stack/http-basics)

## More in Web Foundations

- [How the Internet and the Web Work](https://www.internhack.in/roadmaps/tracks/full-stack/how-the-internet-works)
- [HTTP, Requests and Responses](https://www.internhack.in/roadmaps/tracks/full-stack/http-basics)
- [Terminal and Command Line](https://www.internhack.in/roadmaps/tracks/full-stack/terminal-basics)
- [Git and GitHub](https://www.internhack.in/roadmaps/tracks/full-stack/git-and-github)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Full-Stack Developer Roadmap](https://www.internhack.in/roadmaps/tracks/full-stack)
