DNS Record Types Explained

Beginner⏱ 5 min readUpdated October 13, 2026

A domain's DNS is a list of records. Each record answers one kind of question — where is the website, where does mail go, who may issue certificates. This guide covers the types you will actually meet, what they look like and how they fit together.

What a DNS record is

Every record has the same five parts. In a zone file they are written on one line; DNS dashboards show the same fields as columns.

www.example.com. — The name (owner) the record belongs to. The trailing dot marks a fully qualified name; in dashboards you usually type just www or @ for the domain itself.

Point at, tap or tab to a part of the record to see what it does.

Several records with the same name and type form a record set and are returned together: two A records for one name means two addresses, and clients pick between them. A record set shares a single TTL.

The record types you will meet most

The first eight cover almost every website and mailbox; the rest appear as soon as you add services, certificates or DNSSEC.

TypeWhat it doesExample valueRead more
AIPv4 address of a name.203.0.113.10A vs CNAME vs ALIAS
AAAAIPv6 address of a name.2001:db8::10IPv6 readiness
CNAMEMakes one name an alias of another; the resolver follows it.www → example.com.CNAME records
MXMail servers for the domain, with priorities.10 mail.example.com.MX records
TXTFree text; carries SPF, DKIM, DMARC and verification tokens."v=spf1 mx -all"TXT records
NSWhich nameservers are authoritative for the zone.ns1.example.net.Nameservers
SOAZone metadata: primary server, contact, serial and timers.ns1.example.net. hostmaster.example.com. …TTL
CAAWhich certificate authorities may issue certificates.0 issue "letsencrypt.org"CAA records
SRVHost and port of a service such as SIP or XMPP.10 5 5060 sip.example.com.SRV records
PTRReverse DNS: the name behind an IP address.10.113.0.203.in-addr.arpa → example.com.PTR records
HTTPSConnection hints for HTTPS: protocols, alternative endpoints.1 . alpn="h2,h3"—
DSLinks a signed zone to its parent (DNSSEC).2371 13 2 1F98…DNSSEC

Records for a website

What the main record types point toexample.comzoneA · AAAAMXTXTNS · SOAWeb serverMail serverMail policiesSPF · DKIM · DMARCNameservers
One zone, four jobs: A/AAAA find the website, MX the mail servers, TXT publishes mail policies, NS/SOA describe the zone itself.

A browser needs an address. A and AAAA give it directly; a CNAME says "ask for this other name instead", which is how most hosting platforms and CDNs let you point a subdomain at them without knowing their addresses.

The domain itself (the apex, example.com) cannot be a CNAME, because it must also carry NS and SOA records. Providers work around that with ALIAS, ANAME or "CNAME flattening" — see A vs CNAME vs ALIAS.

Records for email

Mail uses three record types, and most delivery problems trace back to one of them.

  • MX says which servers receive mail for the domain. Lower priority numbers are tried first.
  • TXT records publish the policies receivers check: SPF (who may send), DKIM public keys (at selector._domainkey) and DMARC (what to do on failure, at _dmarc).
  • PTR, set by whoever owns the sending IP address, lets receivers check that the server's address maps back to a sensible name.

Records that describe the zone

NS and SOA are not about any service; they describe the zone itself. The NS set must match the delegation at your registrar, and the SOA's last field is the TTL resolvers use to cache "this name does not exist". A small but complete zone looks like this:

$ORIGIN example.com.
$TTL 3600
@       IN  SOA   ns1.example.net. hostmaster.example.com. (
                  2026101301 ; serial
                  7200       ; refresh
                  3600       ; retry
                  1209600    ; expire
                  300 )      ; negative-caching TTL
@       IN  NS    ns1.example.net.
@       IN  NS    ns2.example.org.
@       IN  A     203.0.113.10
@       IN  AAAA  2001:db8::10
www     IN  CNAME example.com.
@       IN  MX    10 mail.example.com.
mail    IN  A     203.0.113.25
@       IN  TXT   "v=spf1 mx -all"
_dmarc  IN  TXT   "v=DMARC1; p=quarantine; rua=mailto:[email protected]"
@       IN  CAA   0 issue "letsencrypt.org"

Most DNS dashboards never show you the SOA and set the serial for you. If you edit zone files by hand, increase the serial on every change, or secondary servers will keep the old data.

Security records

A few record types exist only to protect the domain:

  • CAA limits which certificate authorities may issue certificates for the domain.
  • DS (at the parent) and DNSKEY (in the zone) form the DNSSEC chain of trust; RRSIG records carry the signatures.
  • TLSA (DANE) pins a server certificate in DNS; it requires DNSSEC and is mostly used between mail servers.

Rules that trip people up

  • A name with a CNAME cannot have any other record — no MX, no TXT. That is why the apex cannot be a CNAME.
  • A domain must have exactly one SPF record. Two v=spf1 TXT records make SPF fail for everyone.
  • In zone files, a name without a trailing dot is relative: mail.example.com inside the example.com zone means mail.example.com.example.com.
  • A single TXT string is limited to 255 characters. Long values (DKIM keys) are split into several quoted strings that receivers join back together.
  • The TTL applies to the whole record set. Lower it a day before a planned change, not at the moment of the change.

Looking records up yourself

Any record can be queried from a terminal. dig ships with macOS and most Linux systems; nslookup works on Windows too.

dig example.com A +short
dig example.com MX +short
dig example.com TXT +short
dig example.com ANY        # many servers refuse ANY (RFC 8482)
dig @1.1.1.1 example.com NS
nslookup -type=MX example.com
Tip: A resolver may answer from its cache. To see what the domain's own nameservers say right now, query one of them directly: dig @ns1.example.net example.com A.

Frequently asked questions

How many DNS record types are there?

IANA lists more than 80, but most domains only ever use about ten: A, AAAA, CNAME, MX, TXT, NS, SOA, CAA, SRV and, with DNSSEC, DS.

Which record do I need to point my domain at a website?

An A record (and ideally AAAA) for the domain itself, and usually a CNAME for www. If your host gives you a hostname rather than an address, use ALIAS or CNAME flattening at the apex.

Why does my record not show up?

Either it was saved under the wrong name (for example example.com.example.com) or resolvers still have the old answer cached. Check the record at the domain's own nameservers, then wait for the old TTL to expire.

What is the difference between an A record and a CNAME?

An A record contains an address. A CNAME contains another name, and the resolver repeats the lookup for that name. A CNAME cannot share its name with any other record.

Try it on your domain

See the theory in practice — run a DNS Lookup for your own domain.