Foundational explainer
What is DNS? A practical explanation
Understand how resolvers, nameservers, zones, records, and caching work together to connect a domain name to websites and email.
- Format
- Learn · Beginner
- Published
- Published
- Updated
- Updated
- Reading time
- 3 min read
Key takeaways
- DNS is a distributed, hierarchical database—not one global server.
- Authoritative servers publish records; recursive resolvers find and cache answers.
- TTL values influence how long cached answers may remain in use.
Every time someone types a name like bit.foo into a browser, a short chain of lookups runs in the background before a single byte of the website loads. That chain is the Domain Name System, and it does more than find websites: it routes email, proves domain ownership, and publishes security policies. Understand it once and a whole class of “the site is down” mysteries becomes much less mysterious.
The parts of DNS
DNS has three practical layers:
- The namespace and records form a tree of names and data.
- Authoritative nameservers publish the official records for a zone.
- Recursive resolvers look up answers for applications and cache them.
Your device normally asks a recursive resolver operated by a network provider, organization, or public DNS service. The resolver does the remaining work unless it already has a usable cached answer.
How a lookup works
For a first lookup of www.example.com, a resolver can follow the hierarchy:
- A root nameserver points it toward the
.comtop-level-domain servers. - A
.comserver identifies the authoritative nameservers forexample.com. - An authoritative server returns the requested record for
www.example.com. - The resolver caches the answer for its allowed lifetime and returns it to the client.
The root service is not thirteen physical machines. IANA describes a worldwide network of hundreds of instances configured as 13 named authorities.
Common record types
| Record | Main use |
|---|---|
A | Map a name to an IPv4 address |
AAAA | Map a name to an IPv6 address |
CNAME | Make one name an alias of another name |
MX | Identify mail exchangers for a domain |
TXT | Publish text used for verification and policies such as SPF or DMARC |
NS | Delegate a DNS zone to authoritative nameservers |
CAA | Limit which certificate authorities may issue for a domain |
A zone can contain many records. The root or “apex” name may have A, AAAA, MX, and TXT records at the same time because each serves a different purpose.
What TTL means
Each record has a time to live, or TTL. A resolver may reuse a cached answer until that time expires. Lower TTLs allow a planned change to become visible sooner after caches refresh, but they also increase lookup work. Higher TTLs reduce repeated queries but make old answers remain eligible longer.
“DNS propagation” is a convenient label for caches refreshing at different times — nothing is actually being pushed anywhere. Each resolver simply replaces its cached answer when the TTL runs out, which is why a change can look finished on your phone and unfinished on your laptop at the same moment.
Zones, delegation, and the registrar
The registrar records which nameservers are authoritative for the domain. The DNS provider hosts the zone on those nameservers. They can be the same company, but they are different roles.
Changing a record inside the zone is different from changing nameserver delegation at the registrar. Record changes affect one answer; delegation changes decide which provider supplies all authoritative answers.
Diagnose the right layer
When a site fails, check in order: domain registration status, nameserver delegation, authoritative answers, cached answers, network reachability, TLS, and the application. A valid DNS answer only proves that a name resolved; it does not prove the web server is healthy.
Continue with pointing a domain to a host or the DNS troubleshooting workflow.
Sources and further reading
Related guides
How to point a domain to a web host
Connect a domain to a hosting service with the right DNS records, verify the authoritative answer, and avoid disrupting email.
How to change DNS hosting without breaking anything
Copy the complete zone to the new provider, verify its answers before delegation, handle DNSSEC deliberately, and plan for the long overlap window.
Troubleshooting DNS errors: a step-by-step workflow
Separate registration, delegation, authoritative records, caching, and hosting failures to diagnose NXDOMAIN, SERVFAIL, and wrong-answer problems.
Email DNS records explained: MX, SPF, DKIM, and DMARC
Understand how DNS routes incoming mail and publishes sender authentication without confusing MX records with SPF, DKIM, or DMARC.