← Back to Learning Hub

DNS Records • Intermediate • 5 min read

A Record vs AAAA Record: IPv4 and IPv6 Addresses in DNS

A head to head on A and AAAA records: what each maps to, running dual stack, how Happy Eyeballs picks, and when a stray AAAA quietly breaks reachability.

An A record maps a hostname to an IPv4 address, and an AAAA record maps the same hostname to an IPv6 address. That is the whole difference in one line: same job, different address family. Both are forward DNS records that answer the question of where a name points, and a modern host usually publishes both so it is reachable over IPv4 and IPv6 at once. The interesting part is what happens when the two disagree, because a stray or misconfigured AAAA record can quietly break a site for some visitors while it loads fine for you.

What each record maps to

An A record (the name predates the version numbering and simply means address) points to a 32-bit IPv4 address written as four decimal numbers, such as 203.0.113.10. An AAAA record, read aloud as quad-A, points to a 128-bit IPv6 address written as groups of hexadecimal separated by colons, such as 2001:db8::25. The four A letters are a nod to IPv6 being four times the bit length of IPv4. Both record types live at the same hostname and share the same TTL rules, and a resolver returns whichever family the client asks for. You can see both at once for any hostname with a DNS lookup.

Running dual stack

Publishing both an A and an AAAA record for a hostname is called dual stack, and it is the normal, recommended setup. The host becomes reachable by IPv4-only clients, IPv6-only clients, and everyone in between. The two records are independent: they can point at the same server through different addresses, or at entirely different endpoints. Nothing in DNS forces them to agree, which is exactly why a dual-stack setup needs both addresses to actually work, not just resolve. A broad tour of the record families sits in the DNS record types explained guide.

How browsers choose with Happy Eyeballs

When a hostname has both an A and an AAAA record, the client decides which to use, and modern clients use an algorithm called Happy Eyeballs. The client starts connection attempts over both families almost at once, slightly favoring IPv6, and uses whichever connects first, cancelling the loser. The point is resilience: if IPv6 is broken on the path, the IPv4 attempt wins within a fraction of a second and the user never notices.

Happy Eyeballs hides a lot of trouble, but it does not hide everything. If an AAAA record exists and points somewhere that accepts the connection but then fails, as opposed to refusing it outright, the client can sit waiting on IPv6 before giving up, which users experience as a slow site rather than a broken one. That is the failure mode the next section is about.

When a stray or missing AAAA quietly breaks things

Two mirror-image problems cause most AAAA grief. The first is a missing AAAA where it should exist: that is rarely fatal because IPv4-capable clients still have the A record, though IPv6-only networks lose reach. The second is the dangerous one: an AAAA record that exists but points at a server not actually listening on IPv6, or at a stale address from an old host. IPv6-capable visitors follow the AAAA, hit a dead endpoint, and either stall or fail, while you on IPv4 or with a forgiving browser see nothing wrong. This is why the symptom is almost always reported as the site works for me but not for them. Our guide on missing and broken AAAA records digs into that case.

A record vs AAAA record compared

AttributeA recordAAAA record
Address familyIPv4IPv6
Address length32-bit128-bit
Example value203.0.113.102001:db8::25
NotationDotted decimalColon hexadecimal
PurposePoint a name to an IPv4 hostPoint a name to an IPv6 host
Common failureWrong or stale IPv4 targetRecord points at a host not listening on IPv6

A quick checklist for A and AAAA

  1. Decide whether the host should be dual stack; if it should, publish both an A and an AAAA record.
  2. Confirm every address you publish is live by connecting over that family, not just by checking that the record resolves.
  3. Remove any AAAA record left over from a previous host or CDN before it starts stranding IPv6 visitors.
  4. Keep the A and AAAA TTLs consistent so a change takes effect on both families together.
  5. After any move, look up both record types and test reachability from an IPv6 network as well as IPv4.

The fastest way to see what a hostname publishes today is a DNS lookup, which returns the A and AAAA answers side by side so you can spot a stray or stale address before your users do.

Frequently asked questions

What is the difference between an A and an AAAA record?

An A record maps a hostname to an IPv4 address and an AAAA record maps it to an IPv6 address. They do the same job for different address families, and a host can and usually should publish both.

Do I need both an A and an AAAA record?

You need an A record for IPv4 reachability, which is still universal. An AAAA record is strongly recommended so IPv6 clients can reach you directly, but only publish one if the server truly listens on that IPv6 address.

Can an A and AAAA record point to different servers?

Yes. DNS does not require them to agree. They often point at the same machine through different addresses, but nothing stops them pointing at separate endpoints, which is sometimes used during migrations.

Why does my site work for me but not for some users?

A common cause is an AAAA record pointing at a host that is not listening on IPv6. IPv6-capable visitors follow it and stall or fail, while you on IPv4 see no problem. Check the AAAA target and remove it if it is stale.

What is Happy Eyeballs?

It is the algorithm modern browsers use when a name has both A and AAAA records. The client races connections over both families, slightly favoring IPv6, and keeps whichever connects first so a broken IPv6 path does not block the user.

A and AAAA are the same idea in two address families, and the trouble is almost always a record that resolves but does not actually serve. Check both at once with the DNS lookup tool whenever reachability is in question.

Troubleshooting box

If results look inconsistent, compare authoritative nameservers first, then recursive resolvers by region. Capture snapshots every 10 minutes for deterministic incident timelines.

Try VallaDNS free →