DNS Record Types Explained
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.
| Type | What it does | Example value | Read more |
|---|---|---|---|
A | IPv4 address of a name. | 203.0.113.10 | A vs CNAME vs ALIAS |
AAAA | IPv6 address of a name. | 2001:db8::10 | IPv6 readiness |
CNAME | Makes one name an alias of another; the resolver follows it. | www → example.com. | CNAME records |
MX | Mail servers for the domain, with priorities. | 10 mail.example.com. | MX records |
TXT | Free text; carries SPF, DKIM, DMARC and verification tokens. | "v=spf1 mx -all" | TXT records |
NS | Which nameservers are authoritative for the zone. | ns1.example.net. | Nameservers |
SOA | Zone metadata: primary server, contact, serial and timers. | ns1.example.net. hostmaster.example.com. … | TTL |
CAA | Which certificate authorities may issue certificates. | 0 issue "letsencrypt.org" | CAA records |
SRV | Host and port of a service such as SIP or XMPP. | 10 5 5060 sip.example.com. | SRV records |
PTR | Reverse DNS: the name behind an IP address. | 10.113.0.203.in-addr.arpa → example.com. | PTR records |
HTTPS | Connection hints for HTTPS: protocols, alternative endpoints. | 1 . alpn="h2,h3" | — |
DS | Links a signed zone to its parent (DNSSEC). | 2371 13 2 1F98… | DNSSEC |
Records for a website
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.
MXsays which servers receive mail for the domain. Lower priority numbers are tried first.TXTrecords publish the policies receivers check: SPF (who may send), DKIM public keys (atselector._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:
CAAlimits which certificate authorities may issue certificates for the domain.DS(at the parent) andDNSKEY(in the zone) form the DNSSEC chain of trust;RRSIGrecords 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
CNAMEcannot 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=spf1TXT records make SPF fail for everyone. - In zone files, a name without a trailing dot is relative:
mail.example.cominside theexample.comzone meansmail.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.comdig @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.
See the theory in practice — run a DNS Lookup for your own domain.
Updated October 13, 2026
- RFC 1035 — Domain Names: Implementation and Specification
- RFC 3596 — DNS Extensions to Support IPv6
- RFC 2782 — A DNS RR for Specifying the Location of Services (SRV)
- RFC 8659 — DNS Certification Authority Authorization (CAA)
- RFC 9460 — Service Binding and Parameter Specification via the DNS (SVCB and HTTPS)