LookMyIPLookMyIP
Blog/DNS Record Types Explained: A, AAAA, CNAME, MX, TXT & More
DNS9 min read

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

By LookMyIP Editorial

A complete guide to DNS record types including A, AAAA, CNAME, MX, TXT, NS, SOA, SRV, and PTR records. Learn what each type does and when to use it.

What Are DNS Records?

DNS (Domain Name System) records are instructions stored on authoritative DNS servers that provide information about a domain. They map human-readable domain names to IP addresses, direct email to the right servers, verify domain ownership, and much more.

Every domain has multiple DNS records of different types, each serving a specific purpose. Understanding these record types is essential for managing websites, email, and other domain-related services. You can look up DNS records for any domain using LookMyIP's DNS Lookup tool at lookmyip.com/dns.

A Record (Address Record)

The A record is the most fundamental DNS record type. It maps a domain name to an IPv4 address. When someone types your domain into a browser, the DNS resolver looks up the A record to find the server's IP address.

Example: example.com → 93.184.216.34

You can have multiple A records for the same domain pointing to different IP addresses. DNS will round-robin between them, providing basic load balancing.

A records are what you update when migrating your website to a new server.

AAAA Record (IPv6 Address Record)

The AAAA record (pronounced "quad-A") is the IPv6 equivalent of the A record. It maps a domain name to an IPv6 address.

Example: example.com → 2606:2800:0220:0001:0248:1893:25c8:1946

As IPv6 adoption grows, it's increasingly important to have AAAA records alongside your A records. Most modern hosting providers and CDNs support IPv6 and can provide AAAA records automatically.

CNAME Record (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, which is then resolved to an IP.

Example: www.example.com → example.com blog.example.com → mysite.wordpress.com

CNAME records are commonly used to:

  • Point "www" to the root domain
  • Connect subdomains to third-party services (like a blog platform or CDN)
  • Simplify management when one server hosts multiple services

Important limitation: You cannot place a CNAME record at the root/apex of your domain (e.g., example.com). CNAME records can only be used on subdomains. Some DNS providers offer workarounds like ALIAS or ANAME records for this purpose.

MX Record (Mail Exchange)

MX records specify which mail servers handle email for a domain. Each MX record has a priority value — lower numbers mean higher priority.

Example: example.com MX 10 mail1.example.com example.com MX 20 mail2.example.com

The sending mail server tries the highest-priority (lowest number) server first. If it's unavailable, it falls back to the next one. This provides redundancy for email delivery.

For a detailed guide on MX records and email routing, see our guide on MX Records Explained.

TXT Record (Text Record)

TXT records store arbitrary text data associated with a domain. While originally designed for human-readable notes, they're now primarily used for machine-readable purposes:

SPF (Sender Policy Framework): Specifies which mail servers are authorized to send email on behalf of your domain. Example: v=spf1 include:_spf.google.com ~all

DKIM (DomainKeys Identified Mail): Contains a public key used to verify email signatures.

DMARC: Defines how receiving servers should handle emails that fail SPF or DKIM checks.

Domain verification: Services like Google Workspace, Microsoft 365, and various SaaS tools ask you to add a TXT record to prove you own the domain.

Security policies: Records like CAA (Certificate Authority Authorization) control which CAs can issue SSL certificates for your domain.

NS Record (Nameserver)

NS records specify which DNS servers are authoritative for a domain. These are the servers that hold the definitive DNS records for the domain.

Example: example.com NS ns1.cloudflare.com example.com NS ns2.cloudflare.com

When you register a domain or change DNS providers, you update the NS records at your registrar to point to your chosen DNS provider's nameservers. NS records are critical — if they're misconfigured, your entire domain (website, email, everything) stops working.

Other Important Record Types

SOA (Start of Authority): Contains administrative information about the zone, including the primary nameserver, the responsible party's email, and timing parameters for zone transfers and caching.

SRV (Service Record): Specifies the host and port for specific services. Used by protocols like SIP, XMPP, and Microsoft Active Directory. Example: _sip._tcp.example.com SRV 10 5 5060 sipserver.example.com

PTR (Pointer Record): The reverse of an A record — maps an IP address to a hostname. Used in reverse DNS lookups. PTR records are essential for email servers, as many receiving servers reject email from IPs without valid PTR records.

CAA (Certificate Authority Authorization): Specifies which Certificate Authorities are allowed to issue SSL/TLS certificates for the domain. Helps prevent unauthorized certificate issuance.

Try It Yourself

Use LookMyIP's free tools to look up IP addresses, check DNS records, verify SSL certificates, and more.