What each record type does
A and AAAA map a hostname to an IPv4 or IPv6 address, which is the lookup that happens before any web request. CNAME points one hostname at another and is how most services ask you to configure a subdomain. NS names the authoritative servers for the domain - the ones that hold the real answers.
MX records direct email, and their priority numbers decide which server is tried first. TXT records hold arbitrary text and have become the place verification and email policy live: SPF, DKIM and DMARC records are all TXT records, as are the ownership proofs services ask you to add.
Propagation, TTL, and waiting for a change
DNS changes do not propagate in the usual sense - resolvers around the world cache the old answer until its time-to-live expires. The TTL you set before making a change determines how long that takes, which is why lowering TTL a day in advance of a migration is standard practice and lowering it afterwards does nothing.
This is also why a record can look correct to you and wrong to a colleague. You are reading a fresh answer while their resolver is still serving a cached one. Checking here queries directly rather than through your local cache, which is the fastest way to tell the two situations apart.
When email stops arriving
Email delivery problems are DNS problems more often than not. Missing or wrong MX records mean mail has nowhere to go. A broken SPF record - or two SPF records where there must only ever be one - causes receiving servers to treat your mail as suspicious. A DKIM record with a line break introduced by a copy-paste fails signature validation silently.
Reading the actual TXT records is the fastest way to see which of those is happening, because the bounce message rarely says.
Frequently asked questions
- How long do DNS changes take?
- Up to the TTL of the record being replaced, since resolvers cache the previous answer until it expires. Lowering the TTL before making a change shortens the wait; lowering it afterwards does not help.
- What is the difference between an A record and a CNAME?
- An A record points a hostname directly at an IP address. A CNAME points it at another hostname, which is then resolved in turn. A CNAME cannot be used at the root of a domain.
- Why is my email not being delivered?
- Check MX records exist and point at the right servers, then check the SPF TXT record. Having two SPF records is a common and silent cause of delivery failure - there must only ever be one.
- What are TXT records used for?
- Arbitrary text, but in practice domain ownership verification and email authentication - SPF, DKIM and DMARC policies all live in TXT records.