DNS AAAA Record IPv6 Address Format
Understand how IPv6 addresses appear in DNS AAAA records. Learn expanded vs compressed notation in zone files and DNS query responses.
Detailed Explanation
IPv6 in DNS AAAA Records
DNS AAAA records store IPv6 addresses. The address format in a zone file can use either expanded or compressed notation:
; Compressed (common in zone files)
example.com. IN AAAA 2001:db8:85a3::8a2e:370:7334
; Expanded (less common but valid)
example.com. IN AAAA 2001:0db8:85a3:0000:0000:8a2e:0370:7334
Expansion of the Example
The address 2001:db8:85a3::8a2e:370:7334 expands to:
2001:0db8:85a3:0000:0000:8a2e:0370:7334
The :: replaces two consecutive zero groups (groups 4 and 5).
Reverse DNS (PTR Records)
For reverse DNS lookups, IPv6 addresses are written in nibble format under the ip6.arpa domain. Each hex digit becomes a separate label, in reverse order:
4.3.3.7.0.7.3.0.e.2.a.8.0.0.0.0.0.0.0.0.3.a.5.8.8.b.d.0.1.0.0.2.ip6.arpa.
Common AAAA Record Patterns
| Hostname | IPv6 Address |
|---|---|
| ns1.example.com | 2001:db8::1 |
| mail.example.com | 2001:db8::25 |
| www.example.com | 2001:db8:1::80 |
Querying AAAA Records
dig AAAA example.com
nslookup -type=AAAA example.com
host -t AAAA example.com
Use Case
Essential for DNS administrators configuring IPv6-enabled zones, setting up AAAA records for web servers, mail servers, and nameservers. Also important for reverse DNS (PTR) configuration and validating AAAA records during DNS migrations.