Skip to content

DNS records explained

Updated

The Domain Name System (DNS) is the internet's phone book. It turns a name such as example.com into the numbers computers use, and it stores other facts about the name too. Each fact is a record, and each record has a type that says what kind of fact it is.

The common record types

  • A: the IPv4 address for a name
  • AAAA: the IPv6 address for a name
  • CNAME: an alias, saying this name is another name's twin. A name with a CNAME cannot hold other records
  • MX: where email for the domain should be delivered
  • NS: the name servers that hold the domain's authoritative answers
  • SOA: the start of authority, with the primary name server, a serial number that changes with each edit, and timers for how other servers refresh
  • TXT: free text, used to prove who owns a domain and to publish email rules such as SPF, DKIM and DMARC

There are others. A PTR record maps an address back to a name (see reverse DNS), and a CAA record says which certificate authorities may issue certificates for the domain.

example.com.   300   IN   A   93.184.216.34

Reading left to right: the name, the TTL in seconds, the class (IN means internet), the type and the value.

TTL and why changes take time

The TTL (time to live) tells resolvers how long they may keep an answer before asking again. If you change a record, resolvers that already hold the old answer keep serving it until its TTL runs out. People call this propagation, but nothing is pushed around: old answers simply expire at different times. Lowering the TTL a day before a planned change makes the switch faster.

Why compare resolvers

Different resolvers can hold different cached answers for a few minutes after a change. Asking more than one, as the DNS lookup tool does, shows whether they agree yet.

Look up a domain's records