AAAA record: what it is, A vs AAAA, and what to put for IPv6

An AAAA record maps a hostname to an IPv6 address. Learn A vs AAAA, what DNS to put for IPv6, how to check it, and the CNAME conflict.

Daniel Sternlicht

6 min read
LinkedInX
On this page
  1. What is an AAAA record?
  2. What is the difference between A and AAAA records?
  3. What DNS should I put for IPv6?
  4. Can you have a CNAME and an A or AAAA record with the same name?
  5. How to check an AAAA record
  6. AAAA records and email
  7. Troubleshooting AAAA problems
  8. AAAA records and custom domains for SaaS
  9. FAQ

An AAAA record ("quad-A") maps a hostname to an IPv6 address. For IPv6, add an AAAA record at the same name as your A record, with the address your host gave you. A name that has a CNAME can't hold one.

What is an AAAA record?

Here is a sample record:

AAAA 2606:2800:21f:cb07:6820:80da:af6b:8b2c ; TTL 3600

A records hold 32-bit addresses. AAAA records hold 128-bit addresses, which is four times as much data.

What is the difference between A and AAAA records?

Record typeAddress familyBit lengthExample value
AIPv432-bit192.0.2.10
AAAAIPv6128-bit2606:2800:21f:cb07:6820:80da:af6b:8b2c

A and AAAA are the only DNS record types that resolve directly to IP addresses. CNAMEs delegate to other names instead. The A record glossary page covers the IPv4 side.

What DNS should I put for IPv6?

Put an AAAA record at the same name as your A record, with the IPv6 address from your host. Keep the A record too when the site is dual-stack.

The steps are the same in any DNS panel:

  1. Add a record and set the type to AAAA.
  2. Set the host to the name you want: www, or @ for the apex.
  3. Paste the IPv6 address as the value.
  4. Pick a TTL and save.

Use a low TTL while you test, then raise it once the record is right. The DNS TTL page explains what the number controls.

The Domainee glossary recommends A and AAAA records on your apex and your main service hostnames. Its reason: IPv6 adoption is high on mobile networks in many countries, especially the US and India, and an AAAA record can cut latency for some users by skipping a fallback step.

Can you have a CNAME and an A or AAAA record with the same name?

No. A hostname with a CNAME can't have any other record type: no A, no AAAA, no TXT, no MX. The CNAME record page has the full rule.

That is why a CNAME at the apex breaks. A CNAME at acme.com would override the MX records and take email down with it. Read why a CNAME at the root is impossible for the longer version.

The fix:

  • Use a CNAME on subdomains.
  • Use A records, or a DNS provider that flattens CNAMEs, on apex domains.

The everyday version of this trap is the leftover AAAA record. You turn app.acme.com into a CNAME, but an old AAAA record still sits at that name. Delete the AAAA first, then add the CNAME.

How to check an AAAA record

Ask dig or nslookup for the AAAA type.

dig AAAA example.com +short
nslookup -type=AAAA example.com

An empty answer means the name has no AAAA record. Nothing is broken. Nobody added one.

To check for a conflicting CNAME at the same name, ask for that type too:

dig CNAME app.acme.com +short

If you would rather click, the free DNS record lookup checks A, AAAA, CNAME, MX, TXT, NS and SOA records for any domain. Domainee also publishes 18 free public REST endpoints that need no key, with limits of 30 req/min and 500 req/day per IP. They are CORS-enabled, the API reference is under /docs/free-apis, and the browser versions are listed at /free-tools.

AAAA records and email

A sender asks DNS for the MX records of example.com, picks a host from the answer, then looks up that host's A record (or AAAA) to get an IP address.

When MX records exist, A and AAAA records don't change where mail goes. When a domain has no MX records at all, senders fall back to its A or AAAA record and try delivering there.

The Domainee MX lookup runs the check that matters before you touch the apex. Is there a CNAME at the name you entered, and which MX and TXT records would it step on? Run it first. Email outages on a Tuesday are nobody's favorite.

Troubleshooting AAAA problems

A site that loads on IPv4 and fails on IPv6 almost always has an AAAA record that exists and holds the wrong address. A missing record is harmless: IPv6 clients have nothing to try and use the A record instead.

Work through this list:

  1. Run dig AAAA yourname +short and confirm a record comes back.
  2. Compare the address with the one your host gave you, character by character. IPv6 addresses are 128 bits of hex, so typos hide well.
  3. Run dig CNAME yourname +short. Any answer means the AAAA record can't live at that name.
  4. Check the TTL. A TTL of 3600 means resolvers can hold the old answer for up to an hour after you change it.
  5. Query again after the TTL runs out, or run the free DNS propagation checker to see what different resolvers return.

AAAA records and custom domains for SaaS

If you run a SaaS, your customers add the DNS records, and the old ones on their hostname are in the way. For a custom domain on Domainee, POST /v1/domains takes a hostname and an originUrl and returns a CNAME for the customer to add. The CNAME target is edge.domainee.dev.

curl -X POST https://api.domainee.dev/v1/domains \
  -H "Authorization: Bearer $DOMAINEE_API_KEY" \
  -H "content-type: application/json" \
  -d '{ "hostname": "app.acme.com", "originUrl": "https://your-app.example.com" }'

On an apex where the DNS provider disallows a CNAME, Domainee offers two anycast A records instead. GET /v1/domains/{id}/instructions detects the DNS provider from public NS records and returns provider-specific steps. Your customer never needs a registrar account.

Ask customers to delete any old AAAA record on the hostname before they switch. On a subdomain, the old AAAA blocks the CNAME, because a name with a CNAME can't hold other records. On an apex, an old AAAA can keep sending IPv6 clients to the previous host while the A records point at the new one.

Domainee reports DNS state through status and monitorStatus. The states to watch are dns_not_resolving and dns_incorrect. Each domain is re-checked every 5 minutes, or on demand with POST /v1/domains/{id}/check. When a hostname sits in dns_incorrect, run a lookup on it and look for records at that name that shouldn't be there.

Building custom-domain support into a SaaS? The free tier covers up to 20 domains and 100 GB a month, free forever. A card on file is required before the first domain, and it is charged $0 under the free tier. Run your hostname through the free DNS record lookup to see its A and AAAA records first.

FAQ

What is DNS record type A?

An A record maps a hostname to an IPv4 address. It holds a 32-bit value. The AAAA record is its IPv6 counterpart.

Do I need both A and AAAA records?

You need an A record for IPv4 clients. Add an AAAA record when your host gives you an IPv6 address and you want IPv6 clients to connect directly.

How do I check my AAAA record?

Run dig AAAA yourdomain.com +short, or paste the name into the free DNS record lookup. An empty result means no AAAA record exists at that name.

Why is my AAAA record not resolving?

Check for a typo in the address, a CNAME at the same name, or a TTL that has not run out since your last change. Resolvers can serve the old answer until the TTL expires.

Does a missing AAAA record break my site?

No. IPv6 clients fall back to the A record where their network can reach IPv4. The site breaks when an AAAA record exists and holds a wrong address.

  • aaaa record
  • what is an aaaa record
  • aaaa record vs a record
  • aaaa record ipv6
  • aaaa record lookup

Daniel Sternlicht

CEO, Common Ninja

Daniel is the CEO of Common Ninja, the company behind Domainee, Embeddable, Vidocu and SendRaven. Domainee started as the custom domain layer those products kept rebuilding. Here Daniel writes about DNS, SSL and letting customers use their own domains.

Keep reading

All posts

Ship custom domains today.

Mint an API key, register your first hostname, send your customer a single CNAME. The first 20 are free.

AAAA record: what it is, A vs AAAA, and IPv6 setup | Domainee