DNS Record Types Explained

DNS records are instructions stored on DNS servers that tell the internet how to handle requests for your domain. Each record type serves a specific purpose.

A Records (Address Record)

The most fundamental DNS record type. An A record maps a domain name to an IPv4 address (like 192.0.2.1).

Example

example.com β†’ 93.184.216.34

When to use: Point your domain or subdomain to a web server's IP address. Every website needs at least one A record to be accessible.

AAAA Records (IPv6 Address Record)

Similar to A records, but for IPv6 addresses (like 2001:0db8:85a3:0000:0000:8a2e:0370:7334). As IPv4 addresses become scarce, IPv6 adoption is increasing.

Example

example.com β†’ 2606:2800:220:1:248:1893:25c8:1946

When to use: If your hosting provider supports IPv6, add AAAA records alongside your A records for better connectivity and future-proofing.

CNAME Records (Canonical Name)

A CNAME record creates an alias from one domain name to another. Instead of pointing to an IP address, it points to another domain name.

Example

www.example.com β†’ example.com
blog.example.com β†’ mysite.wordpress.com

When to use:

  • Point www to your root domain
  • Connect subdomains to third-party services (like Shopify, WordPress, or CDNs)
  • Simplify DNS management when IP addresses might change

Important

You cannot use a CNAME record on the root domain (apex domain) like example.com. CNAMEs are only for subdomains.

MX Records (Mail Exchange)

MX records specify which mail servers should receive email for your domain. They include a priority numberβ€”lower numbers have higher priority.

Example (Google Workspace)

Priority 1: aspmx.l.google.com
Priority 5: alt1.aspmx.l.google.com
Priority 10: alt2.aspmx.l.google.com

When to use: Required to receive email at your domain. Your email provider (Google Workspace, Microsoft 365, Zoho, etc.) will give you the MX records to add.

Learn more about MX records β†’

TXT Records (Text Record)

TXT records store text information for various purposes. They're commonly used for domain verification and email authentication.

Common Uses

  • SPF - Specify which servers can send email for your domain
  • DKIM - Add a digital signature to verify email authenticity
  • DMARC - Tell receiving servers how to handle failed authentication
  • Domain verification - Prove ownership to services like Google, Microsoft, etc.

Learn more about SPF, DKIM, and DMARC β†’

NS Records (Nameserver)

NS records identify which DNS servers are authoritative for your domain. These are set at your domain registrar and point to your DNS provider.

Example (Cloudflare)

ns1.cloudflare.com
ns2.cloudflare.com

When to use: Change NS records when switching DNS providers (e.g., moving from your registrar's DNS to Cloudflare, AWS Route 53, or another provider).

Learn more about nameservers β†’

SOA Record (Start of Authority)

The SOA record contains administrative information about your DNS zone, including the primary nameserver, administrator email, and refresh intervals. Most users never need to modify this.

PTR Records (Pointer Record)

PTR records are the reverse of A recordsβ€”they map an IP address back to a domain name. Used for reverse DNS lookups, often required by email servers to verify sender legitimacy.

CAA Records (Certificate Authority Authorization)

CAA records specify which Certificate Authorities (CAs) are allowed to issue SSL/TLS certificates for your domain. This helps prevent unauthorized certificate issuance.

Example

0 issue "letsencrypt.org"
0 issue "digicert.com"

Check Your DNS Records

Use DNSLens to instantly view all DNS records for any domain.

Lookup DNS Records