DNS Record Types Explained: A, AAAA, CNAME, MX, TXT & More

A complete reference to every DNS record type, what it does, and when to use it

Why DNS Record Types Matter

DNS is not a single monolithic lookup system — it stores many different types of records, each serving a specific purpose. Understanding record types is essential for anyone managing a domain, setting up email, configuring hosting, or troubleshooting connectivity problems.

When you query a domain's DNS, you can request specific record types. Each type answers a different question: Where does this domain's website live? Which servers handle its email? Is this domain's ownership verified? What is the IPv6 address for this hostname?

DNS records are stored in zone files on authoritative name servers. Each record has a name, a type, a TTL, and a value. Here's the standard format:

name    TTL   class   type   value
example.com.  3600  IN  A  93.184.216.34

Let's walk through every major DNS record type and what it's used for.

A and AAAA Records: IPv4 and IPv6 Addresses

A Record (Address Record): The most fundamental DNS record type. An A record maps a domain name to an IPv4 address. This is what makes example.com load — your browser queries the A record to find the server's IP address.

example.com.  3600  IN  A  93.184.216.34

You can have multiple A records for the same domain, pointing to different servers. DNS resolvers may return these in rotation (round-robin DNS), providing basic load balancing.

AAAA Record (Quad-A Record): The IPv6 equivalent of the A record. As the internet transitions to IPv6, AAAA records become increasingly important. An IPv6 address looks like 2606:2800:220:1:248:1893:25c8:1946.

example.com.  3600  IN  AAAA  2606:2800:220:1:248:1893:25c8:1946

Best practice is to have both A and AAAA records for your domain. Modern clients prefer IPv6 when available but fall back to IPv4 automatically. Use our IP lookup tool to check what address your domain resolves to.

🛡️

Inspect Any Domain's DNS Records

Use our WHOIS lookup to check nameservers and registration details for any domain

Hide My IP Now

CNAME, MX, and NS Records

CNAME Record (Canonical Name): A CNAME is an alias that points one domain name to another. Instead of an IP address, the value is another domain name. The resolver follows the chain until it finds an A record.

www.example.com.  3600  IN  CNAME  example.com.

Important rules: A CNAME cannot coexist with other record types for the same name (except DNSSEC records). You cannot use a CNAME at a domain apex (the root domain itself) — use ALIAS or ANAME records for that if your DNS provider supports them.

MX Record (Mail Exchanger): MX records tell mail servers where to deliver email for a domain. Each MX record has a priority value; lower numbers are tried first. Multiple MX records provide redundancy.

example.com.  3600  IN  MX  10  mail1.example.com.
example.com.  3600  IN  MX  20  mail2.example.com.

NS Record (Name Server): NS records specify which name servers are authoritative for a domain. These are set at the registrar and point to the DNS provider handling your zone (e.g., Cloudflare, Route53, etc.).

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

TXT, SOA, SRV, and PTR Records

TXT Record (Text Record): TXT records store arbitrary text data. They're widely used for domain verification and email security:

example.com.  300  IN  TXT  "v=spf1 include:_spf.google.com ~all"

SOA Record (Start of Authority): Every DNS zone has exactly one SOA record. It contains administrative information: the primary name server, the responsible email address, and timing parameters like refresh intervals and TTL values.

SRV Record (Service Locator): SRV records specify the location of servers for specific services and protocols. Used by VoIP, instant messaging, and other applications that need to discover service endpoints dynamically.

PTR Record (Pointer Record): Used for reverse DNS lookup — mapping an IP address back to a domain name. PTR records live in the in-addr.arpa zone and are managed by whoever controls the IP address block, typically your hosting provider or ISP.

CAA, DNSKEY, and Modern DNS Records

As the DNS ecosystem has evolved, new record types have been added to address security and operational needs:

CAA Record (Certification Authority Authorization): Specifies which certificate authorities (CAs) are allowed to issue SSL/TLS certificates for your domain. This prevents unauthorized certificate issuance.

example.com.  3600  IN  CAA  0 issue "letsencrypt.org"

DNSKEY and DS Records: Part of DNSSEC (DNS Security Extensions). DNSKEY records hold public keys used to cryptographically sign DNS records. DS (Delegation Signer) records link parent and child zones in the DNSSEC chain of trust.

HTTPS and SVCB Records: Newer record types (RFC 9460) that provide service binding information, including HTTPS parameters like supported protocols (HTTP/2, HTTP/3) and connection hints. These help browsers connect more efficiently and securely.

ALIAS / ANAME Records: Not an official standard but widely supported by DNS providers as a workaround for using CNAME-like behavior at the domain apex. Useful for pointing a root domain to a CDN or load balancer by name.

Use our WHOIS lookup to inspect a domain's NS records and find out who manages its DNS zone.

Special Offer

Frequently Asked Questions

What is the difference between an A record and a CNAME?

An A record maps a domain name directly to an IPv4 address. A CNAME (alias) maps a domain name to another domain name, which is then resolved to an IP. CNAMEs add an extra lookup step but are useful for pointing subdomains to services without hardcoding IP addresses.

Can I have multiple A records for the same domain?

Yes. Having multiple A records for the same domain is a common technique for basic load balancing, called round-robin DNS. Resolvers return the list of IPs and clients typically use the first one, with different clients getting different orderings.

What DNS records do I need for email to work?

At minimum you need an MX record pointing to your mail server. For deliverability and to avoid spam filters, you should also configure SPF (a TXT record), DKIM (a TXT record with your public key), and DMARC (a TXT record in the <code>_dmarc</code> subdomain).

What is a PTR record and why does it matter?

A PTR record is the reverse of an A record — it maps an IP address to a domain name. PTR records are used in <a href="/reverse-dns-lookup">reverse DNS lookups</a> and are important for email deliverability: many mail servers reject email from IPs without a valid PTR record (forward-confirmed reverse DNS).

Special Offer×