About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
When a website moves to a new server and some visitors still see the old site, or get errors while others do not, look for an old AAAA record. The A record holds the IPv4 address and the AAAA record holds the IPv6 address, and the two are edited separately. If you updated the A record and left the AAAA record pointing at the old server, visitors whose connection supports IPv6 go to the old server, and IPv4-only visitors go to the new one. Test each family on its own with curl -4 and curl -6.
What the symptom means
A hostname can have several addresses. A client with both IPv4 and IPv6 connectivity asks for both records. RFC 8305 defines the "Happy Eyeballs" method, which the curl manual describes for libcurl, Firefox and Chrome. It says the client "needs to send out both AAAA and A DNS queries", and that it sorts the answers with the destination address selection rules of RFC 6724. The RFC states its own assumption: "the preference policy for the host destination address favors IPv6 over IPv4."
So RFC 8305 assumes IPv6 is tried first. It adds that "If the host is configured to have a different preference, the recommendations in this document can be easily adapted", so a host's own address selection policy can change that order. The method then works like this:
- If the AAAA answer arrives first, the first IPv6 attempt starts at once. If the A answer arrives first, the client waits a short "Resolution Delay", recommended at 50 milliseconds, for the AAAA answer so that IPv6 stays preferred.
- Attempts are staggered. The "Connection Attempt Delay" has a recommended value of 250 milliseconds, with a minimum of 100 milliseconds and a recommended maximum of 2 seconds. The first connection that succeeds wins and the others are cancelled.
- Addresses of the two families are interleaved, "to avoid waiting through a long list of addresses from a given address family if connectivity over that address family is impaired."
That produces two different symptoms from the same mistake:
- The old server is still running and answering on IPv6. The IPv6 attempt succeeds, so IPv6 users get the old site (old content, old certificate, errors from a retired application). IPv4 users get the new one. This is the "works for some" case.
- The old server is switched off. The IPv6 attempt fails, and a Happy Eyeballs client moves on to IPv4 after the delay. Users see a short delay and then the site works. A plain
curl -6 --connect-timeout 5against the name shows how long an IPv6-only attempt takes to fail.
The reverse mistake also occurs: the new server has an AAAA record but does not listen on IPv6, or a firewall blocks IPv6, so users with IPv6 see slowness or failures.
The curl manual describes its own head start for IPv6: "Happy Eyeballs is an algorithm that attempts to connect to both IPv4 and IPv6 addresses for dual-stack hosts, giving IPv6 a head-start of the specified number of milliseconds", and states that libcurl currently defaults to 200 ms.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| AAAA still points at the old server, which still answers | IPv6 users get the old site; IPv4 users get the new one | curl -6 and curl -4 return different servers or content |
| AAAA points at the old server, which is off | Slow first connection, then works | curl -6 --connect-timeout 5 fails, curl -4 works |
| New server has AAAA but no IPv6 listener or firewall rule | Same slowness or failure, only on IPv6 | ss on the new server shows no IPv6 listener on the port |
| AAAA changed but cached | Some resolvers still return the old AAAA | dig AAAA against the authoritative server and a public resolver differ |
Different record sets for example.com and www |
One name works, the other fails | Check AAAA for each name used |
Prove the cause before changing anything
Check what DNS publishes for both families, against the authoritative nameserver and against a public resolver. The dig manual gives the form dig @server name type:
dig @ns1.example.net www.example.com AAAA
dig @ns1.example.net www.example.com A
dig @198.51.100.53 www.example.com AAAA
Replace the nameserver and resolver with your own. The answer section shows the TTL beside each record. Note the AAAA TTL: it sets how long caches keep the old address, and it is independent of the A record's TTL. A name with an A record and no AAAA record is normal for an IPv4-only site.
Then connect over each family and record which address answered. The curl manual documents -4 and -6, which "Request only IPv4 addresses when resolving hostnames" and "only IPv6 addresses" respectively, and -w with the variable remote_ip:
curl -4 -I -s -w '%{remote_ip}\n' https://www.example.com/
curl -6 -I -s -w '%{remote_ip}\n' --connect-timeout 5 https://www.example.com/
-I fetches headers only, -s hides the progress meter, and --connect-timeout limits the connection phase, which "is considered complete when the DNS lookup and requested TCP, TLS or QUIC handshakes are done." The -w text prints remote_ip, "the remote IP address of the most recently done connection - can be either IPv4 or IPv6." Compare the headers (Server, Date, Last-Modified, certificate) between the two runs, and check that the printed address is the one you expect for each family.
To test a specific IPv6 address directly, --resolve lets you give a custom address for a specific host and port pair. The manual says to write IPv6 addresses within brackets:
curl -I --resolve www.example.com:443:[2001:db8:100::10] https://www.example.com/
On the new server, check that it listens on IPv6. The ss manual gives -l for listening sockets, -n for numeric output and -t for TCP:
ss -ltn
Look for a line listening on the IPv6 wildcard address and port 443. To see whether IPv6 traffic reaches the old server at all, capture there using the pcap-filter keyword ip6:
tcpdump -n -i eth0 ip6 and port 443
Example (illustrative): shop.example.com moved from an old host at 203.0.113.10 and 2001:db8:100::10 to a new host at 198.51.100.20, which has no IPv6. The A record was changed and the AAAA record was left. The AAAA TTL is 14,400 seconds, which is 4 hours (14,400 ÷ 3,600 = 4). curl -4 prints 198.51.100.20 and the new site's headers. curl -6 prints 2001:db8:100::10 and the old site's headers. Office users on IPv4 see the new shop; customers on an IPv6 mobile network see the old catalogue. The old host is still running, so the failure looks like stale content, not an outage.
Fix
Choose the end state that matches the new server.
The new server has IPv6 working
Change the AAAA record to the new server's IPv6 address. Confirm first that it listens on IPv6 and that the firewall and any load balancer allow it, using ss -ltn and a curl -6 --resolve test as above.
Risk: changing the AAAA record is a DNS change that moves every IPv6-capable visitor to the new address as caches expire. A wrong or unreachable address breaks those visitors, and cached copies of the old address stay until the AAAA TTL passes (4 hours in the example). Keep the old value, which you recorded from the earlier dig. To back out, put the old value back, and expect the same TTL delay before every resolver sees it.
The new server has no IPv6
Delete the AAAA record for that name. Then clients only have IPv4 addresses and use them. Do not leave the record in place "for later".
Disruptive step: deleting an AAAA record changes how every IPv6-capable client reaches the site, immediately for resolvers that fetch it fresh, and after the TTL for cached ones. Keep a copy of the record so that you can add it again. An IPv6-only client has no IPv4 address to fall back to, so check that you have no IPv6-only users before you delete it.
The old server is still answering
Do not rely on the old server to hide the problem. After you fix DNS, wait at least the old AAAA TTL (4 hours in the example) before retiring the old host. If you must stop users reaching old content now, stopping the old web service or redirecting from it will do so (either one takes that host's content away from its visitors, and the way back is to start the service again or remove the redirect), at the cost of errors for anyone still holding the old address.
Disruptive step: stopping the old service ends service to every client still using the old address, including any for whom the old site is the only working path. Back out by starting the service again.
Confirm the fix
dig @ns1.example.net www.example.com AAAAreturns the intended address, or no answer if you removed it.curl -4 ...andcurl -6 ...print the expected addresses and the same site. If you removed the AAAA record,curl -6should report that it could not resolve or connect, which is correct.- Test from a public resolver and from a network that has IPv6, such as a mobile phone connection.
- After the AAAA TTL has passed, the old server's access log shows no new visitors.
What to watch afterwards
- Every record type for a name after a move: A, AAAA, CNAME, and the same for the bare domain and
www. The page titled "DNS Changed but Users Still Reach the Old Application" covers resolver caches and open connections. - Connection time. If a site is slow only on the first request from IPv6 clients, check the AAAA record.
- Whether the new host should have IPv6. If so, add it deliberately and test it, not by leaving an old record behind.
Read next
Related articles you may want next.
- TroubleshootingDNS Changed but Users Still Reach the Old ApplicationDistinguish authoritative DNS, resolver caches and existing connections so an application migration has a measurable cutover and return plan.Read article
- TroubleshootingSmall Requests Work but Large Transfers Hang: Proving a Path MTU Black HolePing works but large transfers or TLS stall? Prove a PMTU black hole with DF pings and captures, then fix it by allowing ICMP, clamping MSS or lowering MTU.Read article
- TroubleshootingDNSSEC SERVFAIL after changing DNS provider: the stale DS record and the safe order to move a signed zoneDomain gives SERVFAIL after changing DNS provider? Prove a stale DS record with dig +dnssec and +cd, then fix it at the registrar in the safe order.Read article
Risks and limits
- These commands have not been run or lab-tested. The command forms and quoted wording are taken from the curl, dig, ss and tcpdump manuals and from RFC 8305. Statements about records, caches and what a visitor sees after a move are general DNS practice and are not quoted from those sources.
- The values in RFC 8305 are recommendations. Browsers and libraries set their own delays; curl's manual says libcurl defaults to 200 ms and that Firefox and Chrome use 300 ms.
- Client and resolver behaviour differs by product and version, so test from several networks, including one with IPv6.
- Content delivery networks and DNS providers may serve or flatten records differently from a plain authoritative zone. Check at the provider.
- Connection stalls on large transfers are a different fault; see "Small Requests Work but Large Transfers Hang: Proving a Path MTU Black Hole".
Sources
- RFC 8305: Happy Eyeballs Version 2: Better Connectivity Using Concurrency — IETF, December 2017, accessed 18 November 2026
- curl manual: curl - How To Use — curl project, describes curl 8.23.1, no date shown, accessed 18 November 2026
- BIND 9 manual pages: dig — Internet Systems Consortium, no version or date shown, accessed 18 November 2026
- ss(8) — Linux man-pages project, page obtained 2026-08-04, accessed 18 November 2026
- tcpdump(1) (page shows "Updated: 10 September 2026") and pcap-filter(7) (page shows "Updated: 16 September 2026") — tcpdump project, accessed 18 November 2026
This article was originally published on .