Adding IPv6 addresses to DNS is a critical step in modernizing your network infrastructure. This comprehensive guide covers everything you need to know about configuring IPv6 DNS records across multiple platforms, from popular DNS providers to manual BIND configurations.
IPv6 uses AAAA records (quad-A records) to map domain names to IPv6 addresses, just as A records map domains to IPv4 addresses. An AAAA record contains a 128-bit IPv6 address in colon-separated hexadecimal format, such as 2001:0db8:85a3:0000:0000:8a2e:0370:7334 or its compressed form 2001:db8:85a3::8a2e:370:7334.
For dual-stack environments (supporting both IPv4 and IPv6), you'll typically configure both A and AAAA records pointing to the same hostname. This ensures maximum compatibility across all networks.
Cloudflare makes it straightforward to add IPv6 support to your domain:
@ for the root domain (example.com)www for www.example.comapi, blog, mail)2606:4700::6811:b055)fe80::0:0:1, it will be stored and returned as fe80::1Type: AAAA
Name: www
IPv6 Address: 2001:db8::567:89ab
TTL: Auto
Proxy: Enabled
AWS Route 53 provides robust IPv6 support for both standard and alias records:
For AWS services (CloudFront, ELB, S3), create alias AAAA records:
example.com. 300 IN AAAA 2001:db8:cafe:f9::d3
www.example.com. 300 IN AAAA 2001:db8:cafe:f9::d4
For organizations running their own DNS servers with BIND9, IPv6 configuration is straightforward:
Add AAAA records to your zone file using this format:
$ORIGIN example.com.
$TTL 2d
; IPv6 records
@ IN AAAA 2001:db8::1
www IN AAAA 2001:db8::2
mail IN AAAA 2001:db8::3
ftp IN AAAA 2001:db8::4
For hosts with both IPv4 and IPv6, attach both record types:
; Dual-stack server
server IN A 192.0.2.10
IN AAAA 2001:db8::10
; Dual-stack website
www IN A 192.0.2.20
IN AAAA 2001:db8::20
Round-Robin Load Balancing:
web IN AAAA 2001:db8::5
IN AAAA 2001:db8::6
IN AAAA 2001:db8::7
Custom TTL Values:
cdn 3600 IN AAAA 2001:db8::8
Multiple Mail Servers:
mail IN AAAA 2001:db8::32
mail IN AAAA 2001:db8::33
mail IN AAAA 2001:db8::34
::ffff:192.0.2.1) - use separate A records insteadrndc reloadnamed-checkzone example.com /path/to/zone/fileReverse DNS is crucial for email delivery, security, and network diagnostics. IPv6 reverse DNS uses the ip6.arpa zone.
IPv6 reverse DNS requires converting the address into a specific format:
.ip6.arpa to the endIPv6 Address: 2001:db8::567:89ab
Expanded: 2001:0db8:0000:0000:0000:0567:89ab
Reversed PTR: b.a.9.8.7.6.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa
In BIND:
; Reverse zone file for 2001:db8::/32
$ORIGIN 8.b.d.0.1.0.0.2.ip6.arpa.
$TTL 86400
@ IN SOA ns1.example.com. hostmaster.example.com. (
2025101901 ; Serial
3600 ; Refresh
1800 ; Retry
604800 ; Expire
86400 ) ; Minimum
IN NS ns1.example.com.
IN NS ns2.example.com.
; PTR records
b.a.9.8.7.6.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 IN PTR www.example.com.
In Cloudflare:
Cloudflare supports reverse zones with the following steps:
ip6.arpa zone to your accountdig -x 2001:db8::1 or host 2001:db8::1Time to Live (TTL) values control how long DNS records are cached. Proper TTL configuration is critical for dual-stack deployments:
Synchronize TTLs: Use identical TTL values for corresponding A and AAAA records
www 300 IN A 192.0.2.1
www 300 IN AAAA 2001:db8::1
Start Conservative: Use shorter TTLs (300-600 seconds) during initial IPv6 deployment for quick rollback capability
Increase Gradually: After confirming stability, increase TTL to reduce DNS query load:
Lower Before Changes: Reduce TTL 24-48 hours before planned DNS changes
Deploying both IPv4 and IPv6 requires careful planning to ensure seamless connectivity:
1. Service Parity
2. DNS Server Dual-Stack
@ IN NS ns1.example.com.
@ IN NS ns2.example.com.
ns1 IN A 192.0.2.10
ns1 IN AAAA 2001:db8::10
ns2 IN A 192.0.2.11
ns2 IN AAAA 2001:db8::11
3. Happy Eyeballs Compatibility
4. Monitoring and Testing
5. Avoid Common Pitfalls
After adding IPv6 DNS records, thorough testing is essential:
Check AAAA records:
dig example.com AAAA
nslookup -type=AAAA example.com
host -t AAAA example.com
Check reverse DNS:
dig -x 2001:db8::1
host 2001:db8::1
Test from both protocols:
curl -4 https://example.com # Force IPv4
curl -6 https://example.com # Force IPv6
Comprehensive IPv6 Testing: Use test-ipv6.run to validate your IPv6 configuration. This tool tests:
DNS Propagation:
IPv6 Connectivity:
AAAA record not resolving:
dig @8.8.8.8 example.com AAAAIPv6 connectivity fails despite correct DNS:
ip -6 addrip6tables -Lip -6 routeMixed results from different locations:
Adding IPv6 to DNS is a straightforward process across modern platforms, whether you're using managed services like Cloudflare and Route 53 or running your own BIND servers. The key principles remain consistent:
By following these best practices, you'll ensure smooth dual-stack operation and position your infrastructure for the IPv6-dominant future. Remember to test your configuration regularly and monitor for asymmetric connectivity issues as you deploy IPv6 across your services.