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
Guide DNS Learn Beginner domains

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:

  1. A root nameserver points it toward the .com top-level-domain servers.
  2. A .com server identifies the authoritative nameservers for example.com.
  3. An authoritative server returns the requested record for www.example.com.
  4. 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

RecordMain use
AMap a name to an IPv4 address
AAAAMap a name to an IPv6 address
CNAMEMake one name an alias of another name
MXIdentify mail exchangers for a domain
TXTPublish text used for verification and policies such as SPF or DMARC
NSDelegate a DNS zone to authoritative nameservers
CAALimit 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

Was this guide helpful?