DEV Community

Sreekar Reddy
Sreekar Reddy

Posted on • Originally published at sreekarreddy.com

πŸ“ž DNS Explained Like You're 5

The phone book of the internet

Day 7 of 149

πŸ‘‰ Full deep-dive with code examples


The Phone Book

Remember phone books? (Ask your parents! πŸ“š)

You wanted to call Pizza Hut, but you didn't memorize their number.

You looked up: "Pizza Hut" β†’ Found: 555-1234

Then you called 555-1234.

DNS does the same thing for websites!


Computers Use Numbers

Computers don't understand "google.com".

They understand IP addresses (numbers), like <ip-address> for example.com.

That's like a phone number for a computer.


How DNS Works

You type: example.com

Your Browser: "Hey DNS, what's the number for example.com?"
     ↓
DNS: "Let me check... It's `<ip-address>`"
     ↓
Your Browser: "Thanks!" β†’ Calls `<ip-address>`
     ↓
Google's Server: "Hello! Here's your search page!"
Enter fullscreen mode Exit fullscreen mode

Why It Matters

Imagine memorizing numbers for every website:

  • (an IP address) (Google)
  • (an IP address) (Facebook)
  • (an IP address) (Netflix)

Not practical!

DNS lets us use easy names instead.


In One Sentence

DNS translates friendly website names into the number addresses that computers actually use.


πŸ”— Enjoying these? Follow for daily ELI5 explanations!

Making complex tech concepts simple, one day at a time.

Top comments (0)