If you have ever logged into your DNS control panel to point a domain at a server, you have seen two record types sitting side by side: A and AAAA. They look nearly identical in every dashboard, they both map a hostname to an IP address, and yet they are fundamentally different under the hood. Getting them confused — or skipping one entirely — can leave part of your audience unable to reach your site, break email delivery, or cause mysterious intermittent failures that are extremely frustrating to debug. This guide explains exactly what each record does, why both exist, and how to configure them correctly for any hosting setup.

What Is an A Record

An A record (Address record) maps a hostname to an IPv4 address. IPv4 is the original addressing scheme for the internet, using 32-bit addresses written as four groups of numbers separated by dots. Every device that connects to the internet has used IPv4 since the 1980s, and the format is instantly recognizable.

A typical A record looks like this in a zone file:

example.com. 300 IN A 203.0.113.42 www.example.com. 300 IN A 203.0.113.42

When a browser resolves example.com, it sends a DNS query asking for the A record. The resolver returns 203.0.113.42, and the browser opens a TCP connection to that address on port 80 or 443. Simple, fast, and still the most widely supported record type on the planet.

IPv4 addresses look like: 192.0.2.1, 203.0.113.42, 198.51.100.200. They are 32 bits long, giving a theoretical maximum of about 4.3 billion unique addresses — a pool that was effectively exhausted by around 2011.

What Is an AAAA Record

An AAAA record (Quad-A record) maps a hostname to an IPv6 address. IPv6 was designed specifically to solve IPv4 exhaustion. It uses 128-bit addresses written as eight groups of four hexadecimal digits separated by colons. The name "AAAA" reflects the fact that an IPv6 address is four times as long as an IPv4 address (4 × 32 bits = 128 bits).

A typical AAAA record in a zone file:

example.com. 300 IN AAAA 2001:db8::1a2b:3c4d www.example.com. 300 IN AAAA 2001:db8::1a2b:3c4d

IPv6 addresses look like: 2001:db8::1, 2606:4700:4700::1111, fd00::1. The double colon (::) is a shorthand that compresses one or more consecutive groups of zeros.

IPv6 provides approximately 340 undecillion unique addresses — enough to assign billions of addresses to every grain of sand on Earth. It also brings built-in features like stateless address autoconfiguration (SLAAC), improved multicast, and simplified routing headers.

Key Differences at a Glance

  • Address length: A record uses 32-bit IPv4; AAAA record uses 128-bit IPv6.
  • Format: IPv4 is dotted decimal (e.g., 203.0.113.1); IPv6 is colon-separated hex (e.g., 2001:db8::1).
  • Address pool: IPv4 has ~4.3 billion addresses; IPv6 has ~340 undecillion.
  • Protocol query type: Resolvers query TYPE A for IPv4 and TYPE AAAA for IPv6.
  • Compatibility: IPv4 is universally supported; IPv6 support is near-universal but still occasionally missing on older ISPs and embedded devices.
  • Coexistence: A domain can have both an A and AAAA record simultaneously — and usually should.

How DNS Resolution Works for Each

When a modern operating system resolves a hostname, the DNS stub resolver typically sends both an A query and an AAAA query in parallel (this is called "dual-stack" resolution). The OS then applies an address selection algorithm defined in RFC 6724 to decide which address to connect to first. In practice, IPv6 is preferred when both records exist and the client has a working IPv6 connection — a behavior called Happy Eyeballs (RFC 8305).

This means:

  1. If only an A record exists, IPv4 is used unconditionally.
  2. If only an AAAA record exists, IPv6 is used — and clients without IPv6 cannot connect at all.
  3. If both records exist, clients pick the best option automatically. IPv6-capable clients use IPv6; IPv4-only clients fall back to IPv4.

Publishing both record types is the safest and most future-proof approach for any public-facing service.

How to Add or Edit These Records in Popular DNS Panels

Cloudflare

  1. Log in at dash.cloudflare.com and select your domain.
  2. Click DNS in the left sidebar, then Add record.
  3. For IPv4: set Type to A, enter the hostname (or @ for root), paste the IPv4 address, set TTL.
  4. For IPv6: set Type to AAAA, same hostname, paste the IPv6 address.
  5. Toggle the orange cloud (proxy) on or off as needed, then click Save.

cPanel / WHM (shared hosting)

  1. Log in to cPanel, navigate to Zone Editor under the Domains section.
  2. Click Manage next to your domain, then Add Record.
  3. Choose A from the Type dropdown, enter the name and IPv4 address.
  4. Repeat with AAAA and your IPv6 address if your host supports it.

AWS Route 53

  1. Open the Route 53 console, go to Hosted zones, and select your zone.
  2. Click Create record. For a simple record: choose Simple routing.
  3. Set the record type to A, enter your IPv4 value, then save.
  4. Create a second record with type AAAA and your IPv6 value.

Verifying Your Records from the Command Line

Always verify after making changes. Use dig on Linux/macOS or nslookup on Windows.

# Check the A record dig A example.com +short # Check the AAAA record dig AAAA example.com +short # Check both at once dig example.com A AAAA # Windows equivalent nslookup -type=A example.com nslookup -type=AAAA example.com

If the AAAA query returns NOERROR with no answer section, it simply means no AAAA record is published — not an error, just absent. If it returns SERVFAIL or NXDOMAIN, something is wrong with the zone itself.

You can also use the DNS Lookup tool on this site to query A and AAAA records from multiple global resolvers without installing anything.

Should You Publish Both Records

The short answer is yes, if your server has an IPv6 address. Here is the reasoning:

  • Future-proofing: IPv6 adoption is accelerating. Major mobile carriers in North America, Europe, and Asia now assign IPv6-only addresses to mobile devices, relying on NAT64/DNS64 to reach IPv4-only destinations. Publishing a real AAAA record eliminates the NAT64 translation step and gives those users a faster, cleaner connection.
  • SEO and performance: Google has confirmed it crawls over IPv6. A direct IPv6 connection avoids carrier-grade NAT (CGNAT) hops, reducing latency for many users.
  • Redundancy: If a transit provider has an IPv4 routing issue, users with IPv6 can still reach you.

The only legitimate reason to skip AAAA is if your server does not have an IPv6 address assigned by your hosting provider — in that case, publishing a broken AAAA record is worse than publishing none at all, because some resolvers will try IPv6 first and timeout before falling back to IPv4.

Common Mistakes and How to Fix Them

Publishing an AAAA record pointing to a server without IPv6

This is the most common dual-stack misconfiguration. If your VPS has only an IPv4 address but you accidentally paste that IPv4 address into an AAAA record field, you will get a malformed record (most DNS panels will reject it), or if you paste a real IPv6 address for a different server, connections will fail silently for a subset of users.

Fix: SSH into your server and run:

# Check which IP addresses are assigned to the server ip addr show # Or on older systems ifconfig -a

Look for an inet6 line that is not fe80:: (link-local). That is your public IPv6 address. If none exists, contact your hosting provider to enable IPv6, or simply do not publish an AAAA record.

Firewall blocking IPv6 traffic

A server may have a valid IPv6 address but ip6tables is dropping all incoming traffic. Symptom: dig returns the AAAA record correctly, but connections time out.

# Check ip6tables rules sudo ip6tables -L -n -v # Allow HTTP and HTTPS over IPv6 sudo ip6tables -A INPUT -p tcp --dport 80 -j ACCEPT sudo ip6tables -A INPUT -p tcp --dport 443 -j ACCEPT

TTL set too high during a migration

If you are moving from one IP address to another, a high TTL means old records stay cached for hours. Before any planned migration, lower your A and AAAA record TTLs to 300 seconds (5 minutes) at least 24 hours in advance so caches expire quickly.

How Long Propagation Takes

After you create or change an A or AAAA record, propagation time depends on the TTL of the old record. If the old TTL was 3600 seconds (1 hour), resolvers around the world may serve the old value for up to one hour. After that window passes, new queries fetch the updated record.

💡 To check whether your A or AAAA record has propagated globally, use the DNS Propagation Checker on this site. It queries authoritative and recursive resolvers across multiple continents and shows you exactly which locations have the new record and which are still serving the old one.

A Records vs AAAA Records in Email Contexts

Mail servers rely on A and AAAA records too — but through an indirect chain. An MX record points to a mail exchanger hostname (never directly to an IP), and that hostname must itself have an A or AAAA record for the sending server to open a connection. If your MX target has no address records, mail delivery fails completely. Always ensure your mail exchanger hostname resolves to at least one A record; add an AAAA record if your mail server supports IPv6.

Practical Decision Framework

  • Server has only IPv4: Publish A record only. Do not publish AAAA.
  • Server has both IPv4 and IPv6: Publish both A and AAAA records. Configure your web server to listen on both stacks.
  • Server has only IPv6 (rare, niche setups): Publish AAAA only, but be aware that IPv4-only clients cannot reach you without a gateway or proxy.
  • Using a CDN (Cloudflare, Fastly, Akamai): The CDN handles dual-stack automatically at the edge. Your origin can be IPv4-only; the CDN presents both A and AAAA records to end users.

Quick Reference Summary

  • A record = IPv4 address = 32-bit = dotted decimal format
  • AAAA record = IPv6 address = 128-bit = colon-separated hexadecimal format
  • Both can coexist for the same hostname — this is the recommended dual-stack setup
  • Happy Eyeballs ensures clients automatically use the best available protocol
  • Verify with dig A and dig AAAA after every change
  • Lower TTL before planned IP changes to speed up propagation

The distinction between A and AAAA records is one of those foundational DNS concepts that pays dividends every time you set up a new domain or migrate a server. Get both records right from the start, verify them with real queries, and your domain will be reachable by the widest possible audience — today and as the internet continues its long transition to IPv6.