What is DNS and how does it work?
DNS — the Domain Name System — is the internet’s address book. It turns names that people can remember, like wikipedia.org, into the numeric IP addresses that computers use to connect. Almost everything you do online starts with a DNS lookup, usually in a few milliseconds.
Why we need DNS
Computers find each other using IP addresses like 203.0.113.42. Remembering those for every site you use would be impossible, and they change whenever a site moves servers or adds capacity. DNS adds a layer of names on top, so the address can change behind the scenes while the name stays the same.
What happens when you type a web address
Say you type www.example.com into your browser. Here’s the journey, simplified:
- Check the cache. Your browser and operating system first check whether they looked this name up recently. If so, they reuse the answer and you’re done.
- Ask the resolver. If not, your device asks a recursive resolver. This is usually run by your ISP, or a public one like Google (8.8.8.8), Cloudflare (1.1.1.1) or Quad9 (9.9.9.9).
- The resolver asks a root server. The root servers don’t know the answer, but they know who handles
.comand point the resolver there. - Ask the TLD server. The
.comservers don’t know the IP either, but they know which nameservers are responsible forexample.com. - Ask the authoritative nameserver. The domain’s own nameserver holds the real records and replies with the IP address for
www.example.com. - Answer and cache. The resolver passes the answer back to your device and stores it for a while, so the next person who asks gets an instant reply.
Your browser can now connect to that IP address and load the page. Thanks to caching, most lookups skip steps 3 to 5 entirely.
The main players
- Recursive resolver — does the legwork of finding answers for you and caches them. Your ISP’s is used by default.
- Root servers — the starting point that knows where every top-level domain lives.
- TLD servers — run by registries for
.com,.org,.io,.sgand so on. - Authoritative nameservers — hold the actual records for a domain. Often provided by your DNS host, such as Cloudflare, GoDaddy or Amazon Route 53. You can see any domain’s nameservers with our nameserver lookup.
- Registrar — the company where you bought your domain. It tells the TLD registry which nameservers your domain uses.
Common DNS records
| Record | Purpose |
|---|---|
A | Maps a name to an IPv4 address |
AAAA | Maps a name to an IPv6 address |
CNAME | Makes one name an alias of another |
MX | Says which servers receive email for the domain |
TXT | Holds text such as SPF, DKIM and DMARC email-security policies and domain verification codes |
NS | Lists the domain’s authoritative nameservers |
SOA | Administrative details about the zone |
CAA | Limits which certificate authorities can issue SSL certificates |
You can see all of these for any domain using our free DNS lookup tool.
Caching, TTL and “propagation”
Every DNS record has a TTL (time to live), measured in seconds, which tells resolvers how long they can cache it. A TTL of 3600 means “keep this for up to an hour”.
That’s why DNS changes aren’t instant. If you point your domain to a new server, resolvers that cached the old answer keep using it until the TTL runs out. People call this DNS propagation, although nothing is actively spreading — old copies are simply expiring. Lowering the TTL a day before a planned change makes switchovers much quicker.
Does your DNS provider matter?
Your device uses your ISP’s resolver unless you change it. Switching to a public resolver can help in a few ways:
- Speed — large public resolvers have servers close to most users and big caches, so lookups are often a little faster. Page loading isn’t usually transformed, but slow or unreliable ISP DNS is a real cause of sluggish browsing.
- Reliability — if your ISP’s DNS goes down, sites seem “offline” even though your connection works.
- Privacy — some public resolvers commit to minimal logging and support encrypted DNS.
- Filtering — some resolvers can block malware or adult content.
Popular options are Cloudflare (1.1.1.1), Google Public DNS (8.8.8.8) and Quad9 (9.9.9.9). You can set them on your router to cover every device, or on a single device in its network settings.
Encrypted DNS: DoH and DoT
Traditional DNS queries are sent unencrypted, so anyone on the network path — including your ISP or a public Wi-Fi operator — can see which sites you look up. DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT) encrypt those queries. Most modern browsers and operating systems support encrypted DNS in their settings, and our DNS lookup tool uses DoH itself.
Fixing common DNS problems
- “DNS_PROBE_FINISHED_NXDOMAIN” or “server not found” — check the spelling. Then try another site. If nothing loads, restart your router or switch to a public DNS resolver.
- A site works on mobile data but not Wi-Fi — your home router or ISP resolver may have a stale or failing cache. Restart the router or change its DNS servers.
- Your own site changes aren’t showing — wait for the TTL to expire, and confirm with a DNS lookup that the new record is live.
- Flush your device cache — on Windows run
ipconfig /flushdns. On macOS, runsudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder.
In summary
DNS translates names into addresses so you never have to remember an IP. Resolvers do the searching, nameservers hold the answers, and caching keeps it fast. When something goes wrong — a site won’t load, email bounces, a migration seems stuck — a quick DNS lookup is usually the fastest way to see what’s really going on.