appzasGamesToolsDevLearnReferenceNetworkTimeCalculatorsCompareLLM prices

Record types: A, AAAA, CNAME, MX, TXT, NS, CAA

Lesson 2 of 412 minBeginner

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.

TypeWhat it doesExample value
AName to IPv4 address93.184.216.34
AAAAName to IPv6 address2606:2800:220:1:248:1893:25c8:1946
CNAMEAlias to another namewww points to example.com.
MXMail servers, with a priority (lower is tried first)10 mail.example.com.
TXTFree text: SPF, DKIM, domain verification"v=spf1 include:_spf.example.com ~all"
NSWhich nameservers are authoritativens1.provider.com.
CAAWhich certificate authorities may issue certificates0 issue "letsencrypt.org"
SOAZone 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.com itself) 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.

1. Which record maps a name to an IPv6 address?
2. In an MX record, which priority is tried first?
3. Why can a CNAME not sit at the zone apex in standard DNS?
4. Which record type restricts which certificate authorities may issue certificates?

Key terms