Insights

Migrated to a New Server but Some Visitors Still Hit the Old One? Check AAAA

November 8, 2026
0:00
After a migration, the usual routine is to point the A record at the new IP, wait for the TTL, and call it done. Then the reports start coming in. Some people see the new site and some still see the old one. Sometimes the same person sees one version on their phone and the other on office Wi-Fi. Clearing caches does nothing. Very often the A record is fine, and the problem is an AAAA record nobody touched.
An A record maps a hostname to an IPv4 address. An AAAA record maps the same hostname to an IPv6 address. They are separate entries in the zone, and DNS has no idea they belong together. Changing one does nothing to the other. A resolver that asks for AAAA gets whatever AAAA record is in the zone, and caches it under that record's own TTL. So after a migration you can easily end up with a zone where the A record points to the new server's IPv4 address and the AAAA record still points to the old server's IPv6 address. From DNS's point of view, both answers are valid. Which server a visitor reaches depends on which address family their device ends up using. This is easy to miss because many site owners never created an AAAA record themselves. Some control panels and hosting setups add one automatically when the server or account has an IPv6 address. A zone that was exported or copied from the old server brings that record along. Whether this happens depends on the panel and how it is configured, so check the zone instead of assuming.
It helps to follow what happens when a browser on a dual-stack machine (one with both IPv4 and IPv6 connectivity) opens https://example.com.
  1. 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() with AF_UNSPEC triggers both lookups.
  2. 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.
  3. 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.conf can override this ordering.
  4. A simple program calls connect() on the first address and only tries the next one if that fails.
  5. 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.
The important part is what counts as failure. Happy Eyeballs protects you from broken IPv6, where packets go nowhere. It does not protect you from working IPv6 that leads to the wrong server. If the old server is still running, which is common because people keep it around for safety, the TCP handshake over IPv6 completes normally. TLS succeeds because the old server still has a valid certificate for the domain. The HTTP request is served from the old document root. From the client's point of view nothing went wrong, so it has no reason to fall back to IPv4. That is why the symptom looks random when it is not. It follows which networks give visitors IPv6. Many mobile networks do, many home broadband connections do, and some office networks do not. The same laptop can land on two different servers depending on which network it is on. A support engineer testing from a network without IPv6 sees the new site and reasonably concludes the migration worked. The same logic explains a different symptom that appears once the old server is shut down. IPv6 visitors get a slower first connection or occasional timeouts while the client waits on a dead IPv6 path before falling back. Clients that do not implement Happy Eyeballs, such as some scripts, API consumers, and older tools, may hang until their connect timeout or fail outright.
Start by asking DNS for each address family separately. +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 +answer
If the AAAA query returns an address that belongs to the old server, you have found the problem. Check www 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/
If 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.
There are two valid fixes, and the right one depends on the new server. If the new server has IPv6 and the site is set up to listen on it, update the AAAA record to the new address. Test with 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.
Before a cutover, list every record that holds the old server's addresses, both IPv4 and IPv6, rather than searching only for the old IPv4 address. Running 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.

Join My Newsletter & Get Updates!

Get notified whenever a new technical guide, server infrastructure breakdown, or personal reflection goes live, plus a curated weekly digest.