00How the Web Works/Lesson 1 of 4
What happens when you visit a website
Before writing a single line of code
You type "google.com" and press Enter. Here is what happens, in order:
- Your browser asks a DNS server, "what is the IP address for google.com?"
- DNS replies with something like "142.250.80.46"
- Your browser sends a REQUEST to that address
- Google's server sends back a RESPONSE — a bundle of files
- Your browser reads those files and paints the screen
The web is, at its core, computers requesting and serving files. Everything else is layered on top of that one idea.