DNS basics9 min read
DNS Record Types Explained: A, AAAA, CNAME, MX, TXT, NS and More
DNS zones contain different record types for different jobs. Knowing which one to inspect avoids chasing the wrong problem during a website launch, email migration or certificate renewal.
Website and address records
- A maps a hostname to an IPv4 address.
- AAAA maps a hostname to an IPv6 address.
- CNAME makes one hostname an alias of another hostname.
- CAA controls which certificate authorities may issue TLS certificates.
Email and verification records
- MX tells senders where to deliver inbound mail.
- TXT stores SPF, DKIM, DMARC and domain verification values.
- SRV publishes service hostnames and ports for protocols such as SIP or LDAP.
- PTR maps an IP address back to a hostname through reverse DNS.
Authority and delegation records
- NS lists the authoritative nameservers for a zone.
- SOA identifies zone authority, serial number and timing values.
- Parent-zone delegation and child-zone NS data should remain consistent.
- DNSSEC-related failures often appear as SERVFAIL from validating resolvers.
Quick terminal examples
Common lookupsdig
dig example.com A +short
dig example.com MX +short
dig example.com TXT +short
dig example.com NS +short
dig -x 8.8.8.8 +short