Record types: A, AAAA, CNAME, MX, TXT, NS, CAA
What each DNS record does, with realistic examples.
A DNS zone is a list of records. Each has a name, a type, a value and a TTL (time to live, in seconds). These are the types you will meet most.
| Type | What it does | Example value |
|---|---|---|
| A | Name to IPv4 address | 93.184.216.34 |
| AAAA | Name to IPv6 address | 2606:2800:220:1:248:1893:25c8:1946 |
| CNAME | Alias to another name | www points to example.com. |
| MX | Mail servers, with a priority (lower is tried first) | 10 mail.example.com. |
| TXT | Free text: SPF, DKIM, domain verification | "v=spf1 include:_spf.example.com ~all" |
| NS | Which nameservers are authoritative | ns1.provider.com. |
| CAA | Which certificate authorities may issue certificates | 0 issue "letsencrypt.org" |
| SOA | Zone metadata: primary server, serial, timers | (managed by the provider) |
CNAME rules
- A name with a CNAME cannot have other record types, such as MX or TXT.
- Because of that rule, a CNAME at the zone apex (
example.comitself) is not allowed in standard DNS. Many providers offer "CNAME flattening" or an ALIAS record that behaves like one safely.
Wildcards
A record named * matches any name that has no record of its own. *.example.com can send every undefined subdomain to the same place. An explicit record always wins over the wildcard.
Email needs more than MX
MX says where mail goes. To prove your messages are legitimate you also publish SPF (which servers may send), DKIM (a public key for signatures) and DMARC (what to do when checks fail), all as TXT records. Without them, your mail is more likely to land in spam.
Test yourself
Answer all the questions, then check them. Finish with every answer right to mark the lesson as done.