Two records, two separate answers
What a client does when a name has both records
- The stub resolver on the machine sends two queries, one for A and one for AAAA, usually in parallel. On Linux with glibc, a program calling
getaddrinfo()withAF_UNSPECtriggers both lookups. - The recursive resolver answers each query from its cache or from the authoritative nameservers. Each answer carries its own TTL, so the two can expire at different times.
getaddrinfo()sorts the combined list of addresses using the destination address selection rules from RFC 6724. Those rules compare things like scope and precedence. In the default policy table, native global IPv6 has higher precedence than IPv4, which is represented internally as::ffff:0:0/96. In practice, if the machine has a working global IPv6 address, the IPv6 destination usually comes first. On glibc systems,/etc/gai.confcan override this ordering.- A simple program calls
connect()on the first address and only tries the next one if that fails. - Browsers and many modern clients use Happy Eyeballs (RFC 8305). They start the IPv6 connection first. If it has not completed after a short delay, they start an IPv4 attempt in parallel, keep whichever finishes the handshake first, and drop the other.
Finding the leftover record with dig
+short trims the output down to just the addresses. Replace the hostnames with your own, and use your zone's real nameserver in the last command.
BASH
# What recursive resolvers currently return
dig A example.com +short
dig AAAA example.com +short
dig AAAA www.example.com +short
# Ask the authoritative nameserver directly (placeholder name below)
dig NS example.com +short
dig @ns1.your-dns-provider.example AAAA example.com +noall +answerwww on its own. It is often a separate record or a CNAME, and a CNAME that points to a name with a stale AAAA record has exactly the same issue.
Querying the authoritative nameserver tells you what the zone says right now. Querying through a normal resolver tells you what cached copy visitors may still be getting. The +noall +answer output includes the TTL column, which shows how long a cached copy can survive.
Next, confirm which server each address family actually reaches. curl can force a specific family, and it can pin a hostname to a specific address. Pinning lets you test one server with the correct Host header and SNI (the hostname sent during the TLS handshake). The IPv6 address below is from the documentation range, so substitute your own.
BASH
# Force IPv4, then IPv6
curl -4 -sI https://example.com/
curl -6 -sI https://example.com/
# Pin the name to a specific IPv6 address (brackets required)
curl -sI --resolve 'example.com:443:[2001:db8::10]' https://example.com/curl -6 fails to connect, your own machine probably has no IPv6 route. Run the test from a host that does, such as a VPS or the new server if it has IPv6. To tell the two servers apart, compare the response headers, or place a small marker file only on the new server and request it over each family.
The old server's access log is the other half of the evidence. If it is still receiving requests from IPv6 client addresses after the cutover, those visitors are reaching it through the AAAA record. Where that log lives depends on the web server and control panel.
Fixing it without making things worse
curl --resolve against the new IPv6 address first. A web server that only listens on IPv4, or a vhost bound to one specific IPv4 address, can answer over IPv6 with a default page or refuse the connection entirely. That symptom is close to the one described in Why a Restored cPanel Account Shows the Default Page Instead of the Site.
If the new server has no IPv6, or you are not ready to serve the site over it, delete the AAAA record. The name becomes IPv4-only, and dual-stack clients simply use the A record. Do not point AAAA at a placeholder address. A missing record is a clean answer. A wrong one is not.
Either way, caching still applies. Resolvers that already cached the old AAAA record keep using it until its TTL expires, and editing the zone does not purge those caches. Keep the old server reachable, or have it serve a maintenance page, until that TTL has passed.
If the old server accepted writes during the split, such as orders, comments, or form submissions, that data now sits in the old database and needs to be reconciled. Putting the old site into read-only or maintenance mode during the overlap stops the two copies from drifting further apart.
While you are in the zone, check the other names too: mail, ftp, panel subdomains, and wildcard records. The same leftover pattern applies to all of them. For mail it usually shows up as delivery problems rather than an old page.
Making it part of the migration routine
dig A and dig AAAA for each hostname you care about takes a minute, and so does searching an exported zone file for the old server's IPv6 prefix. After the cutover, test both families with curl -4 and curl -6 from a host that actually has IPv6, instead of trusting whatever your browser happens to pick. And when a report says some people still see the old site, the first useful question is whether those people are on IPv6.