You type example.com and a page appears — but computers do not route to names, they route to IP addresses. Something has to translate one into the other, instantly, every time, for the entire internet. That something is the Domain Name System, or DNS: the internet’s phone book. This article walks through exactly what happens in the fraction of a second before a page even starts to load.
You can watch real records for any domain with the DNS Lookup tool as you read.
The problem DNS solves
Names are for humans; numbers are for machines. example.com is easy to remember and never has to change even if the site moves to a new server. The IP address behind it can change freely, and DNS is the layer of indirection that lets the name stay stable while the address underneath it moves. Without DNS you would have to memorise an IP for every site you visit — and update it whenever a site changed hosts.
The four players in a lookup
A DNS lookup is a relay between four kinds of server, each knowing just enough to point you one step closer:
- Recursive resolver — usually run by your ISP or a public provider. It does the legwork on your behalf and caches answers. This is the one your device talks to.
- Root servers — the top of the tree. They do not know
example.com, but they know who handles.com. - TLD servers — responsible for a top-level domain like
.comor.org. They know which servers are authoritative forexample.com. - Authoritative servers — hold the actual records for the domain and give the final answer.
A lookup, step by step
When your resolver has nothing cached, resolving www.example.com goes like this:
- Your device asks its recursive resolver for
www.example.com. - The resolver asks a root server, which replies: “I don’t know, but ask the
.comservers.” - The resolver asks a .com TLD server, which replies: “Ask
example.com’s authoritative servers — here they are.” - The resolver asks the authoritative server, which replies with the actual A record: the IP address.
- The resolver hands the IP back to your device and caches it, so the next lookup is instant.
All of this typically finishes in tens of milliseconds. The first visit pays the full relay; every visit after it, until the cache expires, is answered immediately.
The records DNS stores
DNS does more than map names to IPs. A domain’s zone holds several record types, each answering a different question:
| Record | Purpose |
|---|---|
| A | Maps a name to an IPv4 address |
| AAAA | Maps a name to an IPv6 address |
| CNAME | Alias — points one name at another name |
| MX | Mail servers that accept email for the domain |
| TXT | Free-form text — domain verification, SPF/DKIM email security |
| NS | The authoritative name servers for the domain |
An DNS Lookup lets you query any of these for a domain — handy for confirming a site’s IP, checking where its email goes, or verifying a TXT record you just added.
Caching and TTL: why changes take time
To avoid walking the chain on every request, every layer caches answers. How long they may keep one is set by the record’s TTL (time to live), in seconds. A TTL of 3600 means “reuse this answer for an hour.”
This is the reason DNS changes are not instant. When you update a record, resolvers worldwide keep serving the old answer until their cached copy’s TTL runs out — which is why a change can take from minutes to a day to be visible everywhere. Lowering the TTL before a planned change makes the switch propagate faster.
In practice
DNS is invisible until it breaks, and then everything seems down even though the servers are fine — the names just are not resolving. Knowing the chain (resolver → root → TLD → authoritative), the record types, and how TTL governs propagation turns DNS from a black box into something you can reason about and troubleshoot. Inspect any domain’s records with the DNS Lookup, and see how DNS fits the rest of the stack in IP Addressing Explained.
Frequently asked questions
What is DNS?
DNS (Domain Name System) is the internet's directory service. It translates human-friendly domain names like example.com into the numeric IP addresses computers use to connect, so you never have to remember an address.
What is a DNS record?
A DNS record is an entry that tells the world something about a domain. The most common is the A record, which maps a name to an IPv4 address. Others include AAAA (IPv6), CNAME (an alias to another name), MX (mail servers), and TXT (free-form text used for verification and email security).
Why do DNS changes take time to apply?
Because DNS answers are cached for a period set by the record's TTL (time to live). Resolvers around the world keep serving the old answer until the TTL expires, so a change can take minutes to hours to be seen everywhere.
What is the difference between an A record and a CNAME?
An A record points a name directly to an IP address. A CNAME points a name to another name (an alias), which is then resolved to an IP. Use A for the real endpoint and CNAME when you want one name to follow another, like pointing www at your root domain.