What Is DNS and How Does It Work?

How domain names become IP addresses, record types, TTL and propagation.

Updated 4 November 2026 · IPandNet Guides

Computers find each other on the internet using IP addresses, but people prefer names like example.com. The Domain Name System (DNS) translates between them. It is often called the phone book of the internet, though it works more like a huge, distributed and constantly updated directory.

What happens when you visit a website

  1. Your browser asks a DNS resolver – usually run by your ISP, or a public one such as Cloudflare or Google – for the address of the name.
  2. If the resolver does not have a recent answer cached, it asks the root servers, which point it to the servers for the top-level domain (such as .com).
  3. Those point to the domain's authoritative name servers, which hold the actual records.
  4. The resolver returns the answer to your browser and keeps a copy for the time set by the record's TTL.

All of this usually takes a few milliseconds to a few tens of milliseconds.

Common DNS record types

RecordPurpose
A / AAAAMaps a name to an IPv4 / IPv6 address
CNAMEMakes one name an alias of another
MXLists the mail servers for a domain
NSNames the authoritative servers for the domain
TXTFree text, used for SPF, DKIM, DMARC and ownership verification
CAARestricts which certificate authorities may issue SSL certificates
PTRReverse DNS: maps an IP back to a name

TTL and propagation

Each record has a TTL (time to live) in seconds. Resolvers may reuse a cached answer until it expires. When you change a record, some resolvers will keep serving the old value until their copy expires – this delay is called propagation. Lowering the TTL a day before a planned change makes the switch faster. Check progress with our DNS Propagation Checker.

Encrypted DNS

Traditional DNS queries are unencrypted, so anyone on your network path can see which sites you look up. DNS over HTTPS (DoH) and DNS over TLS (DoT) encrypt those lookups. Modern browsers and operating systems support them – look for “secure DNS” in your settings.

When DNS goes wrong

If websites will not load but apps like messaging still work, DNS may be the culprit. Try restarting your router, switching to a public resolver, or flushing your DNS cache (ipconfig /flushdns on Windows).