What Is DNS? How the Domain Name System Works
DNS, the Domain Name System, is the internet's phone book. It quietly turns a name like example.com into the numeric IP address your device actually needs — and it happens dozens of times before a single page finishes loading.
Every time you type a web address, tap a link or open an app, something remarkable happens in a fraction of a second. Computers do not really understand names like example.com; they communicate using IP addresses such as 192.0.2.1 or 2001:db8::1. The Domain Name System (DNS) is the service that bridges the gap, translating the friendly names people remember into the numbers machines route on. Without it, we would all be memorising strings of digits instead of words.
DNS is often called the internet's phone book, and it is a fair analogy: you know a business by name, but to actually call it you need the number. DNS is the directory that looks the number up for you — automatically, constantly, and so fast you never notice.
Why DNS exists
In the internet's earliest days there was no DNS. Every computer kept a single text file listing the names and addresses of every other machine on the network. A central copy was maintained by hand and downloaded periodically. That worked when the network had a few hundred hosts — and became hopeless the moment it started doubling in size. A file edited by one team could not possibly keep pace with a growing, global network.
The answer, designed in the early 1980s, was a distributed, hierarchical system. Instead of one giant list, responsibility would be split into a tree, with different organisations authoritatively managing their own corners. That design is why DNS still scales to billions of names today.
DNS replaced a single, hand-edited file that once listed every computer on the network. Its distributed, hierarchical design is precisely what lets it scale to the entire modern internet.
The pieces of the Domain Name System
A DNS lookup involves several kinds of server, each with a clear role:
- The resolver (or recursive resolver) is the helper that does the legwork on your behalf. It is usually run by your internet provider or a public DNS service, and it is the first stop for your queries.
- Root name servers sit at the top of the tree. They do not know individual addresses, but they know where to find the servers for each top-level domain.
- Top-level domain (TLD) servers handle a suffix such as
.com,.orgor.uk. They point the way to the authoritative servers for a specific domain. - Authoritative name servers hold the real answers — the actual records for a domain like
example.com.
What happens during a DNS lookup
Suppose you visit example.com for the very first time. Here is the journey, step by step:
- Your device asks its configured resolver, "What is the IP address for
example.com?" - The resolver checks its cache. If it looked this up recently, it answers instantly and you are done.
- If not, it asks a root server, which replies, "I don't know, but here are the servers for
.com." - The resolver asks a .com TLD server, which replies, "I don't know the address, but here are the authoritative servers for
example.com." - The resolver asks an authoritative server, which finally answers, "
example.comis at192.0.2.1." - The resolver returns that address to your device and remembers it for next time. Your browser then opens a connection to
192.0.2.1.
All of this typically finishes in a few thousandths of a second. Once your device has the IP address, the rest of the connection — sending the request and receiving the page — is handled by your router and the wider network.
A full DNS lookup can involve four different servers, but thanks to caching, most lookups are answered instantly from memory somewhere along the chain — often before a query ever reaches the root.
DNS records: the entries behind a name
The answers DNS gives come from records, small entries that describe different facts about a domain. You do not need to memorise them all, but a handful come up constantly:
| Record | Purpose | Example value |
|---|---|---|
| A | Maps a name to an IPv4 address | 192.0.2.1 |
| AAAA | Maps a name to an IPv6 address | 2001:db8::1 |
| CNAME | Points one name at another name | example.com |
| MX | Names the mail servers for a domain | mail.example.com |
| TXT | Holds arbitrary text, often for verification | text string |
| NS | Lists the authoritative servers for a domain | ns1.example.com |
There is also a mirror-image process called reverse DNS, which turns an IP address back into a name using a special record type. It is useful for logs and email, and we cover it in reverse DNS and PTR records.
Caching and TTL: why DNS is so fast
If every lookup had to climb the whole tree, DNS would be slow and the root servers overwhelmed. The system avoids that with aggressive caching. Every record carries a Time To Live (TTL) — a number of seconds a resolver is allowed to remember it. During that window, repeat requests are answered instantly from memory.
This is also why changes to DNS are not always immediate. If you update where a name points, older cached copies may linger until their TTL expires. That short delay is the price of the speed caching provides the rest of the time.
DNS and your privacy
Traditionally, DNS queries travelled in plain text, meaning your provider — and anyone able to observe the connection — could see the names you looked up, even when the sites themselves used encryption. Newer approaches such as DNS over HTTPS and DNS over TLS encrypt these queries, closing that gap. If online privacy interests you, our overview of what a VPN is touches on related ground.
Why DNS matters when things break
Because DNS is the first step of nearly every connection, it is a common culprit when the internet "isn't working." If a lookup fails, your device never learns the IP address, so a site will not load even though its server is perfectly healthy. This is why swapping to a different DNS resolver sometimes fixes connectivity, and why "it's always DNS" has become a running joke among network engineers.
DNS is one of the internet's true unsung heroes: invisible, relentless, and quietly running the moment you open almost anything online. The next time a page appears the instant you press Enter, spare a thought for the phone book that made it possible — then, if you like, see what your own address is over at IP Animals.
Frequently asked questions
What does DNS stand for?
DNS stands for Domain Name System. It is the internet's directory service, translating human-friendly names like example.com into the numeric IP addresses that computers use to reach each other.
What happens during a DNS lookup?
When you request a name, your device asks a resolver, which checks its cache and, if needed, queries the root servers, then the top-level-domain servers, then the domain's authoritative servers, walking down the hierarchy until it gets the IP address and returns it to you.
What is a DNS record?
A DNS record is an entry that tells the system something about a domain. Common types include A records that map a name to an IPv4 address, AAAA records for IPv6, MX records for mail servers, and CNAME records that point one name at another.
Why is DNS sometimes the reason a site won't load?
If the DNS lookup fails, your device never learns the IP address, so the page cannot load even when the server itself is fine. Causes include misconfigured records, an unreachable resolver, or stale cached data, which is why changing DNS servers can sometimes fix connectivity.