[ GF.dev ] All Tools →

DNS A, AAAA, CNAME, MX Records Explained Simply

Published 2026-03-29 · Last modified 2026-03-29

DNS records are the entries in your domain's zone file that tell the internet where to find your website, where to deliver your email, and how to verify your domain's identity. If you have ever stared at a DNS management panel wondering what all the record types mean, this guide will clear things up.

We will walk through each common record type with plain-English explanations and real-world examples. For the broader context of how DNS works, see our comprehensive DNS for Web Developers guide.

A Records: The Foundation of DNS

The A record is the most fundamental DNS record type. It maps a domain name directly to an IPv4 address. When someone visits your website, the browser ultimately needs an IP address to connect to, and the A record provides it.

example.com.    3600    IN    A    93.184.216.34

Let's break down this record:

A domain can have multiple A records, which is called round-robin DNS. The resolver returns all of them, and the client typically picks one at random. This provides basic load distribution but is not a substitute for a proper load balancer.

You can look up A records for any domain using our DNS Lookup tool.

AAAA Records: IPv6 Addresses

The AAAA record (pronounced "quad-A") is the IPv6 equivalent of the A record. As IPv4 address space becomes increasingly scarce, IPv6 adoption continues to grow, and many modern hosting providers assign IPv6 addresses by default.

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

IPv6 addresses are 128-bit, written as eight groups of four hexadecimal digits separated by colons. While IPv6 adoption is not yet universal, it is good practice to publish AAAA records alongside your A records. Clients that support IPv6 will prefer it in many cases, and having both ensures maximum reachability.

A domain without an AAAA record will simply be unreachable over IPv6. This is not a critical problem today, but it may become one as more networks transition to IPv6-only configurations.

CNAME Records: Domain Aliases

A CNAME (Canonical Name) 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.

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

In this example, www.example.com is an alias for example.com. When a resolver encounters this CNAME, it performs an additional lookup on example.com to find the A or AAAA record.

CNAMEs are extremely useful when you want multiple domain names to resolve to the same destination, especially when that destination's IP might change. For example, if you use a CDN or a platform like Heroku, they typically give you a hostname to CNAME to rather than an IP address.

Important rules for CNAMEs:

MX Records: Email Routing

The MX (Mail Exchange) record tells sending mail servers where to deliver email for your domain. Without MX records, your domain cannot receive email.

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

Each MX record has two parts beyond the standard fields:

If you use a hosted email service like Google Workspace or Microsoft 365, they will provide you with specific MX records to configure. Getting these wrong is one of the most common reasons for email delivery failures.

To ensure your email is properly authenticated, you should also configure SPF, DKIM, and DMARC records. Read our detailed guide: SPF, DKIM, and DMARC: Stop Your Emails from Going to Spam.

TXT Records: Verification and Authentication

The TXT record stores arbitrary text strings associated with a domain. While originally designed for human-readable notes, TXT records are now used for a wide range of machine-readable purposes:

A single domain name can have multiple TXT records, which is common since different services each require their own verification or configuration string. Validate your email-related TXT records with the SPF Record Test tool on GF.dev.

NS Records: Delegation

The NS (Name Server) record delegates authority for a DNS zone to specific name servers. When you register a domain and configure its name servers at the registrar, you are effectively setting NS records at the TLD level.

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

You should always have at least two NS records for redundancy. Most DNS providers will give you two to four name server hostnames. If one goes down, resolvers will query the others.

NS records are also used to delegate subdomains. For example, if a separate team manages api.example.com, you could create NS records for that subdomain pointing to their DNS servers.

Other Record Types Worth Knowing

Beyond the core record types, several others are useful in specific scenarios:

Practical Tips for Managing DNS Records

Here are some best practices to keep your DNS configuration clean and reliable:

  1. Document your records. Maintain a spreadsheet or internal wiki page listing every DNS record, what it is for, and when it was added.
  2. Audit regularly. Remove stale records, especially CNAMEs pointing to decommissioned services. Dangling DNS records are a common vector for subdomain takeover attacks.
  3. Use appropriate TTLs. Set longer TTLs (3600–86400) for stable records and shorter TTLs (300–600) for records you expect to change.
  4. Test before and after changes. Use the DNS Lookup tool to verify your records are correct before and after making changes.
  5. Consider enabling DNSSEC to protect your domain from DNS spoofing attacks.

Try These Tools

DNS A Record Lookup