DNS is a phone book. When someone types your domain, their computer asks a series of servers which machine to talk to. Each record type answers a different question.
The records you will actually touch
- A: maps a hostname to an IPv4 address. This is what points your domain at your hosting.
- AAAA: the same thing for IPv6.
- CNAME: an alias. Points one hostname at another hostname rather than an address.
- MX: tells the world which server receives your email, with a priority number.
- TXT: free-form text. Used for domain verification, SPF and DMARC.
- NS: which nameservers are authoritative for the domain.
- CAA: which certificate authorities may issue SSL certificates for the domain.
TTL and why changes feel slow
Every record has a time-to-live in seconds. Resolvers cache the answer for that long before asking again. If you know a change is coming, drop the TTL to 300 a day beforehand and the switchover will be nearly instant.
Common mistakes
- Adding a CNAME on the root domain. Most registries do not allow it; use an A record or an ALIAS if your provider supports one.
- Two SPF records on the same domain. Only one is valid — merge them into a single record.
- Forgetting the trailing dot in a fully qualified CNAME target, which turns it into a subdomain of your own domain.
- Leaving old MX records behind after switching mail providers, so a portion of your mail silently goes to the previous host.