DNS TTL explained
You changed a DNS record an hour ago and some visitors still reach the old server. The cause is TTL, time to live: a number of seconds carried with each record in a DNS response that tells caches how long they may reuse the answer. Until it runs out, a resolver keeps serving what it already has and does not ask again.
Who holds on to the old answer
A query travels from the stub resolver on your device to a recursive resolver, which follows the delegation to the authoritative nameserver. The recursive resolver can answer from its cache, so the response a user sees is not necessarily fetched directly from the authoritative server. TTL, record type and response code together explain where a result came from and how long it stays usable.
Lower the TTL before the move, not during it
Lowering TTL ahead of a planned migration shortens future cache lifetimes. Answers that are already cached keep the TTL they received earlier, so make the reduction at least one old TTL before the change. Negative answers are cached too, according to DNS rules: a name that did not exist when someone asked may stay “missing” for them a while after you create it.
Checking whether a stale answer is local
Check the name and query type first, then the authoritative answer, then the recursive resolver you use. After a change, compare the authoritative data with several resolvers; the 2ip DNS check lets you repeat the query. Clearing a local cache helps only when the stale answer is actually local.
Failures differ as well. NXDOMAIN means the name does not exist. SERVFAIL means the resolver could not obtain a usable answer. REFUSED means the server declined the query, and a timeout means no reply came at all.