When a Website Has IPv4 and IPv6, Which One Does Your Browser Use?
Key takeaways
- A records return IPv4 addresses and AAAA records return IPv6 addresses; dual-stack clients interleave both families.
- Under RFC 8305 (Happy Eyeballs v2), a client can start an IPv4 attempt while the initial IPv6 attempt is still pending, then cancel the slower one.
- Actual browser timers and caching heuristics are implementation-dependent even though RFC 8305 recommends a 250 ms Connection Attempt Delay.
- During a BYOIP migration, test IPv4 and IPv6 separately because an ordinary browser load can look healthy while IPv6 is broken.
On this page
When a website publishes both IPv4 and IPv6 addresses, a modern dual-stack browser does not wait indefinitely for one protocol to time out before trying the other. Instead, it interleaves candidate addresses and starts a backup connection attempt shortly after the first, so a fast IPv4 fallback can keep a page loading normally even while the IPv6 path is broken.
That resilience helps everyday visitors, but it creates a blind spot for operators: clicking around a dual-stack site in a browser does not prove that both IPv4 and IPv6 work.
What A and AAAA records supply after you enter a hostname
Suppose a visitor enters app.example.net in a browser on a dual-stack network (a network configured with both IPv4 and IPv6 connectivity). The client issues Domain Name System (DNS) queries for two address record types:
- AAAA record: Supplies one or more IPv6 addresses, such as
2001:db8:40::40. - A record: Supplies one or more IPv4 addresses, such as
198.51.100.40.
These example addresses come from the documentation ranges reserved by RFC 5737 and RFC 3849. For the lookup steps that return those records and how DNS caching behaves during an address change, see What Is DNS? How Domain Names Connect to IP Addresses. For the protocol differences between the two address families, see IPv4 vs IPv6: What’s the Difference?.
How Happy Eyeballs v2 orders and staggers connection attempts
The published internet standard for dual-stack connection racing is Happy Eyeballs version 2, specified in RFC 8305 (in particular Sections 3 through 5 and Section 8). Rather than trying every IPv6 address sequentially until full Transmission Control Protocol (TCP) timeouts expire, a Happy Eyeballs v2 client follows three core rules:
- Asynchronous DNS resolution (Section 3): The client queries AAAA and A records in parallel. If the A answer arrives first, the client may wait briefly (a short resolution delay) for the AAAA answer so IPv6 gets a fair head start without stalling if AAAA is slow or absent.
- Address sorting and interleaving (Section 4): Once candidate addresses are available, the client sorts them according to destination address selection policy and interleaves address families (typically preferring an IPv6 candidate first, followed by an IPv4 candidate, then alternating).
- Staggered connection attempts (Section 5): The client opens a connection attempt to the first candidate (IPv6). If that attempt has not completed within the Connection Attempt Delay (RFC 8305 recommends 250 milliseconds as a default, with a lower bound of 10 ms and an upper bound of 2 seconds), the client starts the next candidate (IPv4) while leaving the first attempt pending. Whichever connection completes first wins, and the client cancels the remaining pending attempts.
Actual browser behavior is implementation-dependent. Chrome, Firefox, Safari, and operating-system networking stacks tune their resolution delays, connection attempt timers, transport protocols (such as QUIC over UDP alongside TCP), and per-host reachability caches differently. RFC 8305 defines the design principles and recommended defaults, not a single fixed millisecond schedule across every browser.
Follow one dual-stack connection attempt
To see how fallback hides an IPv6 outage, walk through a fresh connection to app.example.net after both DNS answers are already available. The clock below uses fabricated illustrative timings (IPv6 starts at 0 ms; if IPv6 has not finished by 250 ms, IPv4 starts at 250 ms and succeeds 80 ms later at 330 ms):
| IPv6 path condition | Selected family | Total elapsed time | What the user sees |
|---|---|---|---|
| Healthy IPv6 (completes at 80 ms) | IPv6 | 80 ms | Page loads over IPv6; IPv4 attempt never starts. |
| Slow IPv6 (would need 500 ms) | IPv4 | 330 ms | IPv4 starts at 250 ms, finishes at 330 ms, and cancels pending IPv6; page loads with only a minor delay. |
| Unreachable IPv6 (packets dropped) | IPv4 | 330 ms | IPv4 starts at 250 ms and succeeds at 330 ms; ordinary page load still looks healthy despite a dead IPv6 path. |
Step through each scenario below to inspect what happens at each milestone on the illustrative clock:
Dual-Stack Connection Timeline (Illustrative Clock)
Fabricated illustrative timings for app.example.net with both AAAA and A records ready (browser timers are implementation-dependent).
At 330 ms: IPv4 completes 80 ms after starting (330 ms total). The browser cancels the slow IPv6 attempt and loads the page over IPv4.
- Selected family
- IPv4
- Final elapsed time
- 330 ms
- Timing note
- Fabricated illustrative clock
IPv4 wins at 330 ms and the pending 500 ms IPv6 attempt is cancelled. An ordinary page load looks healthy with only a small delay.
Why fallback hides problems during a BYOIP migration
During a Bring Your Own IP (BYOIP) cutover or when adding a BYOIPv6 prefix alongside an existing IPv4 range, Happy Eyeballs can mask real defects in production:
- Missing or mismatched IPv6 routing: Your IPv6
/48might lack a valid Route Origin Authorization (ROA), remain unadvertised in a region, or hit a blackhole firewall rule while IPv4 continues serving traffic cleanly. - Transport Layer Security (TLS) or virtual-host gaps: An IPv6 listener on a load balancer may lack the right certificate or backend target group while the IPv4 listener responds normally.
- IPv6-only clients fail silently: Mobile networks running IPv6-only with NAT64 or strict IPv6 monitoring probes cannot fall back the way a dual-stack office laptop does.
The operational rule is straightforward: verify the service separately over each address family. Force explicit IPv4 and IPv6 checks (for example, curl -4 -I https://app.example.net and curl -6 -I https://app.example.net) from outside your own network, inspect certificate and HTTP status on both paths, and monitor IPv4 and IPv6 reachability as separate health signals rather than relying on a single browser load.
FAQ
Related resources
Ready to see where BYOIP is supported?
Continue the series
How Small Can a BYOIP Block Be? Understanding IPv4 /24 and IPv6 /48
If you need only 16 IPv4 addresses, can you bring a /28? The answer depends on which range the cloud imports and which range it delegates.
5 min read · Updated 25 November 2026
Read articleWhen Does BYOIP Pay Off on AWS?
A team replacing 32 public addresses and a team replacing 256 can bring the same IPv4 block to AWS. Calculate how much each can afford to spend on that block.
6 min read · Updated 25 November 2026
Read article