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.
Related
- MX records and how email finds its wayHow MX records tell the world which servers accept mail for a domain, what the priority number means, and what a null MX is.
- Reverse DNS and PTR recordsHow an IP address can point back to a name, who controls that name, and why mail servers care.
- SPF: who may send mail for a domainHow an SPF record lists the servers allowed to send email for a domain, and the mistakes that break it.
- WHOIS and RDAP: who registered a domainWhat a registration record shows, how RDAP replaced WHOIS, and why you rarely see the owner's name any more.
- Who hosts a website, and what a CDN hidesHow a domain name leads to a hosting network, why the answer is often a content delivery network, and what you can and cannot learn from it.
- A domain health checklist: what to check and whyThe handful of public records that say whether a domain is set up sensibly for email, registration and DNS, and what each one protects against.
- NTP: how the internet keeps timeHow your device gets the right time: atomic clocks, layers of time servers called strata, and the round-trip calculation NTP uses to correct a clock.
- DNSSEC explainedHow DNSSEC signs a domain's DNS answers so forged ones can be spotted, how the chain of trust works, and why a broken setup is worse than none.
- TLS certificates explainedWhat the padlock in a browser means, how a certificate and its chain prove a site is genuine, why they expire, and the usual reasons one fails.
- The parts of a web addressHow to read a link from right to left: which part says whose website it is, and the tricks that make a bad link look like a good one.