How DNS works: the internet's phonebook
In short: DNS turns names people remember (example.com) into IP addresses computers use. When DNS fails, websites seem "down" even though the internet connection works.
Why we need DNS
Computers find each other using IP addresses, but people remember names. The Domain Name System (DNS) is like a phonebook: you look up a name and get back a number (the IP address).
What happens when you type a website name
- Your device checks whether it already knows the answer (its cache).
- If not, it asks a DNS resolver, usually run by your router, company or internet provider.
- The resolver asks the DNS servers responsible for that name, starting from the top of the system if needed.
- The answer (an IP address) comes back, and your browser connects to it.
- The answer is cached for a while, so the next visit is faster.
All of this usually takes a fraction of a second.
Common DNS record types
| Record | What it does |
|---|---|
| A | Name → IPv4 address |
| AAAA | Name → IPv6 address |
| CNAME | An alias that points one name to another name |
| MX | Which servers receive email for the domain |
| TXT | Text used for verification and email security (SPF, DKIM, DMARC) |
When DNS goes wrong
A classic sign: you can ping an IP address, but websites won't load by name. Check which DNS servers the device uses, and test with:
nslookup example.com
Clearing the local cache often helps: ipconfig /flushdns on Windows.
Real-world example: "the internet is down", but WhatsApp still works
A family laptop shows "This site can't be reached" for every website. Yet on the same Wi-Fi, a phone still receives WhatsApp messages and the laptop's music app keeps playing. Is the internet really down?
Often the connection is fine and only the name lookup is failing. Apps that already know where to connect can carry on, while a browser that needs to look up a new name gets stuck at the first step of the phone book. Common causes at home include a router that needs a restart, or DNS settings that were changed by hand and later stopped working.
A quick test separates the two problems. If you can ping an IP address such as 8.8.8.8 but nslookup example.com fails, the connection is working and DNS is the problem.
Try this: run nslookup on a website you visit often. Note the address it returns and the name of the server that answered. That server is your resolver, usually your router or your internet provider.
Key takeaways
- DNS converts names into IP addresses.
- Answers are cached to make browsing faster.
- A, AAAA, CNAME, MX and TXT are the records you'll meet most.
- IP works but names don't? Suspect DNS.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.