DNS AAAA Record Explained — IPv6 Address Mapping
Learn what a DNS AAAA record is, how it maps domain names to IPv6 addresses, and how to set up dual-stack DNS with practical dig command examples.
What you'll learn
- Understand what AAAA records are and why they are essential for IPv6 connectivity
- Learn the correct IPv6 address format and AAAA record syntax
- Configure dual-stack DNS with both A and AAAA records for full internet reachability
- Use dig commands to query, verify, and troubleshoot AAAA records
The AAAA record (pronounced "quad-A") is the IPv6 equivalent of the A record. While an A record maps a domain name to a 32-bit IPv4 address, a AAAA record maps it to a 128-bit IPv6 address. As IPv6 adoption accelerates globally, AAAA records have become essential for ensuring your services are reachable by all users, especially those on modern mobile networks and IPv6-native infrastructure.
This guide covers AAAA record fundamentals, IPv6 address formatting, dual-stack configuration, and practical dig commands for verification and troubleshooting.
What Is a AAAA Record?
A AAAA record is a DNS record type that stores the IPv6 address for a domain name. The name "AAAA" reflects the fact that IPv6 addresses are four times the size of IPv4 addresses (128 bits vs. 32 bits, or four times the "A").
Here is a AAAA record in standard zone file format:
example.com. 3600 IN AAAA 2001:db8:85a3::8a2e:370:7334| Field | Value | Meaning |
|---|---|---|
| Name | example.com. | The domain name being resolved |
| TTL | 3600 | Cache the result for 3600 seconds (1 hour) |
| Class | IN | Internet class |
| Type | AAAA | This is a quad-A record (IPv6) |
| Content | 2001:db8:85a3::8a2e:370:7334 | The IPv6 address |
When a client with IPv6 connectivity queries DNS for your domain, the resolver returns the AAAA record, and the client connects directly over IPv6.
Why IPv6 Matters
IPv4's approximately 4.3 billion addresses have been exhausted. All five Regional Internet Registries (RIRs) have run out of free IPv4 address blocks. IPv6, with its 340 undecillion addresses, is not just a theoretical improvement -- it is an operational necessity.
Here is why you should care:
- Mobile networks default to IPv6. Major carriers including T-Mobile, Verizon, and Reliance Jio route mobile traffic over IPv6. If your domain lacks AAAA records, these users connect through carrier-grade NAT (CGNAT), adding latency and potential points of failure.
- ISP adoption is accelerating. In many countries, over 50% of residential internet traffic now travels over IPv6.
- Performance gains. IPv6 eliminates NAT traversal, reducing latency. The "Happy Eyeballs" algorithm (RFC 8305) in modern browsers races IPv4 and IPv6 connections, using whichever completes first. If your IPv6 path is faster, users benefit automatically.
- Cloud-native infrastructure. Major cloud providers offer IPv6-only instances at lower cost. Some new services are IPv6-only by default.
For a deeper comparison, see IPv6 vs IPv4.
IPv6 Address Format
Before working with AAAA records, you need to understand IPv6 address notation. An IPv6 address consists of eight groups of four hexadecimal digits, separated by colons:
Full Notation
2001:0db8:85a3:0000:0000:8a2e:0370:7334Compressed Notation
IPv6 allows two forms of shortening:
- Leading zeros within a group can be omitted:
0db8becomesdb8,0370becomes370 - Consecutive groups of all zeros can be replaced with
::(but only once per address)
2001:db8:85a3::8a2e:370:7334Here, :: replaces 0000:0000.
Common Examples
| Purpose | Full Address | Compressed |
|---|---|---|
| Documentation range | 2001:0db8:0000:0000:0000:0000:0000:0001 | 2001:db8::1 |
| Google DNS | 2001:4860:4860:0000:0000:0000:0000:8888 | 2001:4860:4860::8888 |
| Cloudflare DNS | 2606:4700:4700:0000:0000:0000:0000:1111 | 2606:4700:4700::1111 |
| Loopback | 0000:0000:0000:0000:0000:0000:0000:0001 | ::1 |
Tip: DNScale accepts both full and compressed IPv6 notation. Use the compressed form for readability. The system normalizes addresses automatically.
AAAA Record Syntax
Basic AAAA Record
Point your apex domain to an IPv6 address:
example.com. 3600 IN AAAA 2001:db8:85a3::1Subdomain AAAA Records
Just like A records, you can create AAAA records for any subdomain:
www.example.com. 3600 IN AAAA 2001:db8:85a3::1
api.example.com. 3600 IN AAAA 2001:db8:85a3::10
mail.example.com. 3600 IN AAAA 2001:db8:85a3::20Wildcard AAAA Records
Wildcard records work the same way as with A records:
*.example.com. 3600 IN AAAA 2001:db8:85a3::1Dual-Stack Configuration: A + AAAA
The most important concept for AAAA records is dual-stack DNS. A dual-stack configuration provides both an A record (IPv4) and a AAAA record (IPv6) for the same domain name, ensuring every user can connect regardless of their network:
example.com. 3600 IN A 192.0.2.1
example.com. 3600 IN AAAA 2001:db8:85a3::1
www.example.com. 3600 IN A 192.0.2.1
www.example.com. 3600 IN AAAA 2001:db8:85a3::1When a browser resolves example.com:
- It queries for both A and AAAA records simultaneously
- The resolver returns both the IPv4 and IPv6 addresses
- The browser uses the Happy Eyeballs algorithm (RFC 8305) to race connections over both protocols
- Whichever connection succeeds first wins, typically completing in under 25 milliseconds
Note: Always keep TTL values consistent between your A and AAAA records for the same name. Mismatched TTLs can cause confusing behavior where one protocol's record is cached while the other has expired.
Querying AAAA Records with dig
Basic AAAA Query
dig AAAA example.comExample output:
;; ANSWER SECTION:
example.com. 3600 IN AAAA 2001:db8:85a3::8a2e:370:7334Query a Specific Nameserver
Verify your AAAA record directly against the DNScale authoritative nameserver:
dig AAAA example.com @ns1.dnscale.euShort Output
dig +short AAAA example.comOutput:
2001:db8:85a3::8a2e:370:7334Query Both A and AAAA Records
To see your complete dual-stack configuration in one command:
dig A AAAA example.comOr query for ANY records (though some resolvers restrict this):
dig ANY example.com @ns1.dnscale.euVerify IPv6 Connectivity End-to-End
After adding a AAAA record, confirm the server is actually reachable over IPv6:
# Query the AAAA record
dig +short AAAA example.com
# Test connectivity to the IPv6 address
ping6 2001:db8:85a3::1
# Or use curl to test HTTP over IPv6
curl -6 https://example.comTip: Always test IPv6 connectivity before adding AAAA records. If you publish a AAAA record but your server is not reachable over IPv6, users whose devices prefer IPv6 will experience timeouts before falling back to IPv4. This creates a worse experience than having no AAAA record at all.
Trace Full Resolution Path
dig AAAA example.com +traceThis shows every step of the DNS resolution process, which is useful for diagnosing propagation delays.
Check Reverse DNS for IPv6
For mail servers and services that validate reverse DNS, verify that a PTR record exists for your IPv6 address:
dig -x 2001:db8:85a3::1Creating AAAA Records in DNScale
Using the Dashboard
- Navigate to your zone in the DNScale dashboard
- Click Add Record
- Set the fields:
- Name: Enter the subdomain (e.g.,
www) or@for the apex domain - Type: Select
AAAA - Content: Enter the IPv6 address (e.g.,
2001:db8:85a3::1) - TTL: Set the cache duration in seconds (default: 3600)
- Name: Enter the subdomain (e.g.,
- Click Create Record
Using the DNScale API
Create a AAAA record:
curl -X POST "https://api.dnscale.eu/v1/zones/{zone_id}/records" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "www",
"type": "AAAA",
"content": "2001:db8:85a3::8a2e:370:7334",
"ttl": 3600
}'Create a complete dual-stack configuration:
# IPv4 A record
curl -X POST "https://api.dnscale.eu/v1/zones/{zone_id}/records" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "@",
"type": "A",
"content": "192.0.2.1",
"ttl": 3600
}'
# IPv6 AAAA record
curl -X POST "https://api.dnscale.eu/v1/zones/{zone_id}/records" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "@",
"type": "AAAA",
"content": "2001:db8:85a3::1",
"ttl": 3600
}'Verify both records:
dig A AAAA example.com @ns1.dnscale.euFor infrastructure-as-code workflows, AAAA records are fully supported by the DNScale Terraform provider and DNSControl.
Common Mistakes
1. Publishing a AAAA Record Without IPv6 Connectivity
This is the most damaging mistake. If you add a AAAA record but your server does not listen on the IPv6 address, clients that attempt IPv6 connections will experience 20-30 second timeouts before falling back to IPv4. Always confirm IPv6 reachability with curl -6 or ping6 before creating the record.
2. Using an Invalid IPv6 Address Format
IPv6 addresses must follow strict formatting rules. Common errors include:
- Using periods instead of colons (
2001.db8.85a3::1is wrong) - Using more than one
::in an address (only one double-colon is allowed) - Including characters outside the hexadecimal range (
0-9,a-f)
3. Mismatched TTLs Between A and AAAA Records
If your A record has a TTL of 300 and your AAAA record has a TTL of 86400, you create an inconsistent caching window. During migrations, the short-TTL record updates quickly while the long-TTL record remains stale. Keep TTLs identical for records at the same name.
4. Forgetting AAAA Records for Subdomains
If your apex domain has both A and AAAA records but www.example.com only has an A record, IPv6-preferring clients will fail to connect to www.example.com over IPv6. Audit all subdomains to ensure consistent dual-stack coverage.
5. Conflicting with CNAME Records
Just like A records, a AAAA record cannot coexist with a CNAME record at the same name. If you need to alias a subdomain and support IPv6, use a CNAME that points to a target with its own AAAA record, or use an ALIAS record at the apex.
The Transition from IPv4 to IPv6
The internet is in the middle of a decades-long transition from IPv4 to IPv6. Here is where things stand:
- IPv4 exhaustion is real. New IPv4 addresses can only be obtained by purchasing them on the secondary market at significant cost.
- Dual-stack is the standard. Most organizations run both IPv4 and IPv6 simultaneously rather than going IPv6-only.
- IPv6-only networks exist. Some mobile carriers and cloud environments are IPv6-only, using NAT64/DNS64 to reach IPv4 services. Having AAAA records eliminates the need for this translation layer.
- DNS is the enabler. The only change needed in DNS to support IPv6 is adding AAAA records alongside your existing A records. No changes to NS records, SOA records, or zone configuration are required.
Tip: Even if you do not yet have IPv6 on your servers, plan for it now. When you do enable IPv6, adding AAAA records in DNScale takes seconds. Understanding the format and configuration today saves time later.
DNScale and IPv6
DNScale's infrastructure is fully dual-stack. The anycast DNS network responds to queries over both IPv4 and IPv6, and all edge nodes are reachable via both protocols. When you create AAAA records in DNScale:
- The record is immediately written to the primary database
- It replicates to all edge locations via PostgreSQL logical replication
- The record is served from the nearest anycast point of presence
- Both IPv4 and IPv6 clients can query for the record over either protocol
DNScale nameservers themselves have both A and AAAA glue records, ensuring that even IPv6-only resolvers can reach them to look up your domain's records.
Load Balancing with Multiple AAAA Records
Just like A records, you can create multiple AAAA records for the same name to distribute traffic across IPv6 addresses:
example.com. 300 IN AAAA 2001:db8:85a3::1
example.com. 300 IN AAAA 2001:db8:85a3::2
example.com. 300 IN AAAA 2001:db8:85a3::3DNS resolvers rotate through the addresses, providing basic round-robin load distribution. Use a shorter TTL (300 seconds) so you can quickly remove a failed address if needed.
For a complete load-balanced dual-stack setup, pair your AAAA records with matching A records:
example.com. 300 IN A 192.0.2.1
example.com. 300 IN A 192.0.2.2
example.com. 300 IN AAAA 2001:db8:85a3::1
example.com. 300 IN AAAA 2001:db8:85a3::2Conclusion
AAAA records are no longer optional. With IPv6 traffic exceeding 40% of internet traffic globally and growing, domains without AAAA records are leaving performance on the table and risking connectivity issues for a significant portion of users. The good news is that adding AAAA records is straightforward -- the syntax mirrors A records, and DNScale makes dual-stack management simple through both the dashboard and API.
For further reading, explore these related guides:
- DNS A Record Explained -- The IPv4 counterpart to AAAA records
- DNS Record Types -- Overview of all DNS record types
- What Is DNS? -- How the Domain Name System works
- IPv6 vs IPv4 -- Detailed protocol comparison
- DNS TTL Best Practices -- Choosing the right cache duration
- CNAME Records Explained -- When to alias instead of using an IP
Ready to manage your DNS with confidence?
DNScale provides anycast DNS hosting with a global network, real-time analytics, and an easy-to-use API.
Start free