What Is DNS? The Internet's Phone Book Explained
DNS turns names like google.com into numbers computers understand. Learn how it works, why it sometimes fails, and how to fix slow or broken sites.
You remember names, but computers talk in numbers. The Domain Name System, or DNS, is the service that connects the two. Without it, you would have to remember a string of numbers for every website.
The phone book idea
Think about your phone contacts. You tap "Mom", but your phone dials a number. DNS does the same job for the internet. You type a name like `wikipedia.org`, and DNS replies with the IP address of the server where it lives.
How a lookup works
Your device checks its memory
It first checks whether it already knows the address. This saved answer is called a cache.
It asks a DNS resolver
Usually this is run by your internet provider, or a public service you chose. The resolver also keeps a cache.
The resolver asks the root servers
These point to servers that manage endings like `.com` and `.in`.
The top-level domain server points further
It tells the resolver which server holds records for that exact domain.
The authoritative server answers
It gives the final IP address, and the resolver passes it to your device.
Your browser connects
Using the number, your browser contacts the website's server.
All of this normally takes just a few thousandths of a second.
When DNS goes wrong
- "Server not found" errors often mean the DNS lookup failed, even if your internet is working.
- A site works on mobile data but not Wi-Fi may point to a problem with your router's DNS.
- Slow first load, fast later is the cache at work.
Simple fixes to try
Restart your router and device
This clears temporary problems.
Clear your device's DNS cache
On Windows, open Command Prompt and run `ipconfig /flushdns`.
Try another DNS provider
Public resolvers include Cloudflare (1.1.1.1) and Google (8.8.8.8). Change the setting on your router or device.
Check for typing mistakes
A misspelled domain is the most common cause.
What most people miss
- DNS can see which names you look up. Choosing a DNS provider is also a privacy choice. Some providers support encrypted DNS to hide lookups from others on the network.
- DNS is a common target for attacks. Criminals can try to send you to fake sites by tampering with DNS answers, so keep your router firmware updated.