DNS Record Types Cheat Sheet: A, AAAA, CNAME, MX, TXT, CAA & PTR Explained

The definitive technical guide and reference chart for every core DNS record type in modern web architectures.

Isometric network engineering visualization showing DNS Record Types A AAAA CNAME MX TXT CAA PTR SRV in a global network
13 min read

The Domain Name System (DNS) is the foundational routing layer of the internet. While every developer encounters DNS when launching a site or connecting a domain, the nuances between different record types—such as A vs AAAA, CNAME vs ALIAS, or CAA issuance restrictions—often cause downtime and misconfigurations.

This cheat sheet provides clear technical explanations, syntax examples, and best practices for every primary DNS record type.

1. A Record (Address Record)

The most fundamental DNS record. Maps a human-readable hostname to a 32-bit IPv4 address.

; Syntax: [Host] [TTL] [Class] [Type] [IPv4 Address]
example.com.     3600    IN    A       192.0.2.1
api.example.com. 300     IN    A       198.51.100.24

Use Cases: Pointing root domains and subdomains directly to dedicated servers, load balancers, or VPS instances.

2. AAAA Record (IPv6 Address Record)

The 128-bit IPv6 equivalent of an A record. Essential for modern dual-stack web infrastructure and mobile carrier routing.

example.com.     3600    IN    AAAA    2001:0db8:85a3:0000:0000:8a2e:0370:7334

Tip: You can test whether your domain resolves over IPv6 using our IPv6 Readiness Checker.

3. CNAME Record (Canonical Name)

Creates an alias pointing one hostname to another hostname. Resolvers follow the alias until they find an A or AAAA record.

www.example.com.  3600    IN    CNAME   example.com.
docs.example.com. 300     IN    CNAME   cname.gitbook.io.

The Apex Limitation: Per RFC 1034, a CNAME cannot coexist with other records (like SOA and NS) at the zone apex (@). To point your root domain to services like Vercel, Netlify, or Shopify, use CNAME Flattening, ALIAS, or ANAME provided by your DNS host (Cloudflare, Route53, DNSimple).

4. MX Record (Mail Exchanger)

Directs inbound email to designated mail servers. Includes an explicit numeric priority (preference) value.

example.com.     3600    IN    MX    1   aspmx.l.google.com.
example.com.     3600    IN    MX    5   alt1.aspmx.l.google.com.
example.com.     3600    IN    MX    10  alt2.aspmx.l.google.com.

Rules: Lower priority numbers take precedence. The target hostname must resolve to an A/AAAA record, not another CNAME. Check your mail configuration with our MX Lookup Tool.

5. TXT Record (Text Record)

Stores human and machine-readable arbitrary text metadata. TXT records power modern domain ownership verification and email security protocols:

  • SPF: v=spf1 include:_spf.google.com -all
  • DMARC: v=DMARC1; p=reject; rua=mailto:dmarc@example.com
  • DKIM: v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQU...
  • Domain Verification: google-site-verification=abcdef123456

Query all published TXT records with our TXT Lookup.

6. CAA Record (Certification Authority Authorization)

Restricts which Certificate Authorities (CAs) are authorized to issue SSL/TLS certificates for your domain.

example.com.     3600    IN    CAA    0 issue "letsencrypt.org"
example.com.     3600    IN    CAA    0 issuewild "digicert.com"
example.com.     3600    IN    CAA    0 iodef "mailto:security@example.com"

Inspect your CAA tags using our CAA Lookup Tool.

7. PTR Record (Pointer Record)

Used in reverse DNS (rDNS) lookups to resolve an IP address back to its associated hostname. Stored under special reverse domains like in-addr.arpa (IPv4) or ip6.arpa (IPv6).

10.113.0.203.in-addr.arpa.  3600    IN    PTR    mail.example.com.

Verify your IP reverse PTR configuration using our Reverse DNS Tool.

8. NS Record (Name Server)

Delegates a DNS zone to authoritative nameservers responsible for resolving records for that domain.

example.com.     86400   IN    NS     ns1.cloudflare.com.
example.com.     86400   IN    NS     ns2.cloudflare.com.

Summary Reference Table

TypePurposeTarget Example
AHostname to IPv4192.0.2.1
AAAAHostname to IPv62001:db8::1
CNAMEHostname to Hostname Aliasapp.example.com
MXMail Routing & Priority10 mail.example.com
TXTText, SPF, DMARC, Verification"v=spf1 -all"
CAASSL Certificate Issuance Lock0 issue "letsencrypt.org"
PTRReverse DNS (IP to Hostname)host.example.com

To inspect every published DNS record for any domain in parallel, use our comprehensive All DNS Records Suite or DNS Lookup Tool.

Frequently Asked Questions

An A record maps a hostname directly to an IPv4 address (e.g., 192.0.2.1). A CNAME (Canonical Name) record aliases one hostname to another hostname (e.g., app.example.com -> cname.vercel-dns.com). CNAME records cannot coexist with other record types on the same host.