Record Types
The fourteen you will actually meet.
Over eighty types exist. These are the ones you will meet.
A and AAAA
An address. A is IPv4:
dig @1.1.1.1 +short A example.com | sortAAAA is IPv6, and a name can have both:
dig @1.1.1.1 +short AAAA one.one.one.one | sort | head -1CNAME
An alias. The name points at another name, not an address:
dig @1.1.1.1 +short CNAME www.github.comAsk for the address and the resolver follows the chain, returning both steps:
dig @1.1.1.1 +short www.github.comCNAME at the apex
The apex — example.com with no subdomain — always has SOA and NS records, so a
CNAME there is forbidden by that same rule:
dig @1.1.1.1 +short CNAME example.comProviders answer this with ALIAS or ANAME: a record that looks like a CNAME in the
control panel and is flattened to an A record before anyone queries it.
ALIAS is not a DNS record type but a provider feature, so it never appears in dig
output and does not survive moving zones.
MX
Mail routing, with a preference number. Lower is tried first:
dig @1.1.1.1 +short MX gmail.com | sort -n | head -2The Email course’s chapter 1 covers what a sender does with these.
TXT
Free-form text, used for four things that have nothing to do with each other:
dig @1.1.1.1 +short TXT google.com | sort | head -2| Use | Looks like |
|---|---|
| SPF | v=spf1 include:... ~all |
| DKIM | v=DKIM1; k=rsa; p=... |
| DMARC | v=DMARC1; p=reject at _dmarc.<domain> |
| Domain verification | an opaque string a vendor gave you |
The first three are the Email course’s chapter 5. The fourth proves you control a domain and can usually be deleted afterwards.
NS and SOA
NS names the authoritative servers — chapter 2. SOA names one of them as primary and
carries five timers:
dig @1.1.1.1 +short SOA example.com| Field | Here | Means |
|---|---|---|
| primary | elliott.ns... |
the authoritative source |
| contact | dns.cloudflare.com. |
an email address with @ as a dot |
| serial | 2421050422 |
bumped on every change |
| refresh | 10000 |
how often a secondary checks |
| retry | 2400 |
how soon after a failed check |
| expire | 604800 |
when a secondary stops answering |
| minimum | 1800 |
negative cache TTL |
PTR
An address back to a name, in the reverse tree:
dig @1.1.1.1 +short -x 1.1.1.1SRV and CAA
SRV finds a service by protocol and port, named _service._protocol.domain:
dig @1.1.1.1 +short SRV _xmpp-server._tcp.jabber.org | sort | head -1Priority, weight, port, target. CAA is the opposite kind of record — it restricts who
may issue certificates for your domain:
dig @1.1.1.1 +short CAA google.com | sortCAA is the only record that constrains a third party — an authority must check it before
issuing, which makes it a control rather than a hint.
SVCB and HTTPS
The newest pair. An HTTPS record tells a browser which protocols a host speaks before it
opens a connection, saving a round trip.
dig @1.1.1.1 +short TYPE65 cloudflare.com | head -1 | cut -c1-30Record sets
Several records with the same name and type are one set, answered together and signed together:
dig @1.1.1.1 +short A example.com | wc -l | tr -d ' '