What Is DNS? The Internet's Phone Book Explained
Computers find each other with IP addresses, but people prefer names such as example.com. The Domain Name System, or DNS, is the distributed directory that translates names into the numbers computers need. Every web page, email and app connection you make begins with a DNS lookup, usually in a few milliseconds and without you ever noticing. When DNS breaks, however, "the internet is down" even though your connection is fine, which makes it worth understanding.
Why DNS exists
In the early days of the internet, a single file named HOSTS.TXT, maintained by one organization, mapped names to addresses. As the network grew, that approach could not scale. In 1983 the DNS was designed as a hierarchical, distributed database so that no single computer needs to know everything and responsibility for each part of the namespace can be delegated. That design still works today for hundreds of millions of domains.
The structure of a domain name
Read a domain name from right to left. In www.example.com. the (usually invisible) final dot represents the root. Next comes the top-level domain (TLD) com, then the second-level domain example, and finally the subdomain www. Each level is managed by a different party: root server operators, the registry for the TLD, and the owner of the domain, who decides what the subdomains point to.
What happens when you visit a website
- Local check. Your browser and operating system look in their caches. If a recent answer exists, the lookup ends here.
- Recursive resolver. If not, your device asks a recursive resolver, normally run by your internet provider or a public service such as Cloudflare or Google. The resolver does the legwork on your behalf.
- Root servers. The resolver asks a root server where to find
.com. The root does not know the address of the site, but it points to the servers of the.comregistry. There are 13 named root server identities, operated by various organizations and served from hundreds of locations worldwide using anycast routing. - TLD servers. The
.comservers do not know the final address either, but they know which name servers are authoritative forexample.comand return them. - Authoritative name server. The resolver asks that server for
www.example.com, and it replies with the address, for example203.0.113.10. - Answer and caching. The resolver returns the answer to your device and keeps a copy until its TTL expires. Your browser then connects to the address.
Common DNS record types
| Record | Purpose |
|---|---|
| A / AAAA | Maps a name to an IPv4 / IPv6 address |
| CNAME | Makes a name an alias for another name |
| MX | Names the servers that receive email, with priorities |
| NS | Lists the authoritative name servers for a domain |
| TXT | Free text; used for SPF, DKIM, DMARC and domain verification |
| SOA | Zone metadata such as primary server, serial number and timers |
| CAA | Restricts which certificate authorities can issue certificates |
You can look up any of these for a real domain with our DNS Checker.
TTL and "propagation"
Each record carries a time to live, measured in seconds, that tells resolvers how long they may cache it. A TTL of 3600 means up to an hour. When you change a record, resolvers that cached the old value keep returning it until the TTL runs out. This delay is what people call "DNS propagation", though nothing is actually pushed around. If you plan a migration, lowering the TTL a day beforehand makes the switch faster, and you can raise it again afterwards.
Security: DNSSEC and encryption
Classic DNS was designed without authentication or privacy. Two improvements address this. DNSSEC adds digital signatures so that a resolver can verify an answer really came from the domain's owner and was not forged. It does not encrypt anything. Encrypted DNS, such as DNS over HTTPS and DNS over TLS, hides queries from observers on the network path; see DNS over HTTPS. DNS also appears in attacks like cache poisoning, hijacked registrar accounts and phishing domains, so keep registrar logins protected with two-factor authentication.
Troubleshooting DNS problems
- "Server not found" but other sites work: the domain may have expired, its records may be wrong, or your resolver may be failing. Try a different resolver, or check the domain with a DNS lookup tool.
- Website works by IP but not by name: classic sign of a resolver or record problem.
- Old site still shows after a change: wait for the TTL to expire, and flush local caches with
ipconfig /flushdnson Windows or the equivalent on your system. - Email not arriving: inspect MX and TXT (SPF, DKIM, DMARC) records.
Command-line tools such as nslookup and dig show exactly what each server answers. If pages load slowly after the lookup, our speed test can help determine whether the cause is the server rather than DNS.
Conclusion
DNS turns names into IP addresses through a hierarchy of resolvers, root, TLD and authoritative servers, and caches answers for speed. Its records control not only websites but email and security policies. Because everything online starts with a lookup, understanding DNS helps you fix many problems yourself, and understanding its privacy limits helps you decide how to protect it.
Frequently asked questions
Is DNS the same as my IP address?
No. DNS is the service that finds the IP address that belongs to a name. Your own IP address is assigned by your provider.
Which DNS server should I use?
Your provider's resolver works for most people. Public resolvers can be faster or offer filtering and encryption. Pick a reputable one and read its privacy policy.