comparison Domains & DNS
DNS A and AAAA records
Compare DNS A and AAAA records by address family, check both sets independently and avoid assuming IPv6 always works.
What it means
An A record associates a DNS name with an IPv4 address. An AAAA record associates a DNS name with an IPv6 address. They are separate DNS record types: one hostname can publish A records, AAAA records, both or neither. DNS provides candidate addresses; reachability, network selection and the web server's listening configuration determine whether a connection succeeds. A record AAAA record
Try it
Example — compare the requested record with a separate network path. Choose A or AAAA, make either RRset present or absent, and inspect a valid or invalid address fixture. The result changes locally; no address is queried or contacted.
One name, two address families
Ask for one RRset while keeping DNS presence separate from connection success.
Only the requested family is returned. An answer does not predict which address a real browser will use.
| Item | State / result | Why it matters |
|---|---|---|
| Hostname | www.example.test | The same owner name is used for both questions. |
| A RRset | 192.0.2.20 | Independent IPv4 records. |
| AAAA RRset | 2001:db8::20 | Independent IPv6 records. |
| Selected DNS result | A 192.0.2.20 | No network query occurred. |
| Connection fixture | Available in fixture only | Not a test of the documentation address. |
Documentation-only addresses. No real DNS or connection attempt; not a general IP validator.
About this model
A supplies IPv4 data and AAAA supplies IPv6 data. The name www.example.test remains present because the fixture also contains TXT data, even when both address sets are absent. Family validation here accepts only the shown documentation subset. Browser connection racing and address sorting are outside the model.
Read the article’s primary sources for protocol rules and implementation-specific limits. This scene has no network access.
The normal fixture returns 192.0.2.20 for A and 2001:db8::20 for AAAA at the same hostname. Remove the AAAA RRset while leaving A present. An AAAA question now has no requested data, but the A question still has its answer. Even when both address sets are absent, the fixture keeps the name present through separate TXT data, so it does not change to NXDOMAIN.
| Selected condition | DNS result in the example | Connection conclusion |
|---|---|---|
| A present, A question | IPv4 address | Reachability has not been checked |
| AAAA absent, AAAA question | NOERROR / NODATA | No address of that type is supplied |
| AAAA present, broken IPv6 path | IPv6 address is still returned | The declared connection attempt fails separately |
| IPv4 value in an AAAA RRset | Invalid family | Do not proceed as though a valid AAAA answer exists |
The validation presets also include a malformed value. They exercise only a bounded documentation-address subset, not every valid IP spelling. Reset restores both RRsets, a working synthetic IPv6 path and the A question. Browser address sorting and connection racing are intentionally absent, so the example does not predict which address a real browser will try first. A format AAAA format
Compare the two record types
| Criterion | A | AAAA |
|---|---|---|
| Address family | IPv4 | IPv6 |
| Payload | One 32-bit address | One 128-bit address |
| Example value | 192.0.2.25 | 2001:db8::25 |
| DNS owner | Can be www.example.com | Can be that same name |
| Main check | IPv4 reachability and server configuration | IPv6 reachability and server configuration |
A record set may contain multiple addresses. Having a syntactically valid AAAA record does not mean the IPv6 endpoint is reachable from the public Internet or configured to serve the hostname. Equally, deleting AAAA simply to hide a routing problem may harm clients that use IPv6; investigate first.
In practice
When some visitors can open a site and others cannot, compare A and AAAA answers separately and ask whether the origin or CDN listens on both advertised address families. A DNS response alone cannot show the HTTP status, TLS certificate or network route. Obtain actual approved destination addresses from the hosting provider and validate HTTPS for the intended hostname before changing records.
For connection setup consult Connect a domain to a website. If the site only fails for certain visitors, follow A website works for some visitors only, not an assumption that either address family must always win.
Key takeaways
A and AAAA answer different address-family questions about the same name. Validate the family of the data and test reachability separately. A correct AAAA record cannot repair an IPv6 path, and a missing AAAA RRset is not evidence that the whole name is absent.
Sources & model boundaries
Primary references used for this explanation. The interactive example is an educational model, not a live check.
- RFC 1035 — Domain Names: Implementation and Specification
Sections 3.2, 3.3 and 4. RR formats, TTL, A, NS, SOA, CNAME and MX records.
Checked .
- RFC 3596 — DNS Extensions to Support IPv6
Sections 2 and 3. AAAA records and their IPv6 address data.
Checked .
- RFC 5737 — IPv4 Address Blocks Reserved for Documentation
Sections 3–4. TEST-NET IPv4 address examples are documentation-only.
Checked .
- RFC 3849 — IPv6 Address Prefix Reserved for Documentation
Sections 2–3. 2001:db8::/32 is documentation-only IPv6 space.
Checked .