Skip to content
Sign inGet all access
Chapter 3·8 minFree

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 | sort
Output104.20.23.154172.66.147.243

AAAA is IPv6, and a name can have both:

dig @1.1.1.1 +short AAAA one.one.one.one | sort | head -1
Output2606:4700:4700::1001

CNAME

An alias. The name points at another name, not an address:

dig @1.1.1.1 +short CNAME www.github.com
Outputgithub.com.

Ask for the address and the resolver follows the chain, returning both steps:

terminal
dig @1.1.1.1 +short www.github.com
Outputgithub.com.140.82.121.4

CNAME 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.com

Providers 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 -2
Output5 gmail-smtp-in.l.google.com.10 alt1.gmail-smtp-in.l.google.com.

The 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
Output"MS=E4A68B9AB2BB9670BCE15412F62916164C0B20BB""Z29vZ2xl"
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
Outputelliott.ns.cloudflare.com. dns.cloudflare.com. 2421050422 10000 2400 604800 1800
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.1
Outputone.one.one.one.

SRV 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 -1
Output30 30 5269 scarlet.jabber.org.

Priority, 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 | sort
Output0 issue "pki.goog"

CAA 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.

terminal
dig @1.1.1.1 +short TYPE65 cloudflare.com | head -1 | cut -c1-30
Output\# 61 000100000100060268330268

Record 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 ' '
Output2