Imagine having to type a number like 198.51.100.24 every time you wanted to open Facebook. How hard would that be?
The problem DNS solves
A website lives on a server on the internet, and that server has an IP address. To connect, your computer needs that IP. But nobody can remember numbers like that for every site they visit.
Phone numbers are hard to remember too, which is why you save contacts by name. The system that does the same for the internet is DNS, the Domain Name System. It puts a simple name people can understand, a domain name like facebook.com or edwhere.com, on top of an IP address.
How a DNS lookup works
When you type edwhere.com in the browser, it doesn't connect straight to Edwhere's server:
- Your computer asks a DNS server (a server that stores names and their IPs): "What's the IP of edwhere.com?"
- The DNS server replies with the IP.
- Your browser connects to that IP.
- The website comes back.
- The browser asks a DNS server for edwhere.com's IP.
- The DNS server answers with the IP.
- The browser connects to that IP.
- The website comes back.
Try it yourself: open a terminal (Command Prompt on Windows) and type nslookup edwhere.com. The answer is the IP your computer will use.
DNS spoofing
Now, what if a hacker changed the answer, replacing edwhere.com's real IP with their own? Everyone who typed edwhere.com would land on the hacker's site, even though they typed the right name. That's DNS spoofing, and it's one of several attacks aimed at DNS. It's also why HTTPS (lesson 12) matters: a fake site can't show a valid certificate for the real domain.
Key takeaways
- DNS turns domain names into IP addresses.
- Your browser asks a DNS server first, then connects to the IP.
- Try nslookup edwhere.com to see a real lookup.
- DNS spoofing swaps the answer so you land on a fake site.
Quick quiz
Pick an answer to check yourself. Answer both to mark this lesson done.
1. What is DNS's job?
- A) Turn domain names into IP addresses
- B) Turn IPs into MAC addresses
- C) Encrypt data
- D) Save the Wi-Fi password
Show answer
Answer: A. Like the contact list on your phone, DNS takes a name (domain) and gives back its IP address.
2. What happens if DNS spoofing takes place?
- A) The website gets slow
- B) You reach the hacker's site even after typing the right domain
- C) The internet is cut
- D) Your phone's IP changes
Show answer
Answer: B. If the hacker changes the IP in the DNS answer, the right name still takes you to the hacker's IP.
Frequently asked questions
What is DNS in simple words?
DNS is the internet's phonebook. It turns names like edwhere.com into the IP addresses computers use to connect.
What is a DNS server?
A server that stores domain names and their IP addresses and answers your computer's "what is the IP of this name?" questions.
What is DNS spoofing?
An attack that changes a DNS answer so a real domain name points to the attacker's IP, sending visitors to a fake site.