After a DNS change, authoritative nameservers and cached answers can differ. The dig and host tools help you check the published records and compare answers from selected resolvers.

Check the authoritative nameservers

Replace the example domain and nameserver:

dig example.com NS +short
dig @ns1.example.net example.com A +norecurse

Query each authoritative server for the same name and type. If they disagree, investigate the zone or delegation before assuming the difference is only caching.

Compare resolver answers

For example:

dig @8.8.8.8 example.com A
dig @1.1.1.1 example.com A

Review the response status, answer and TTL. Use +short for a compact answer, but remember it hides useful error and authority details.

A few resolver checks are a sample, not proof that every cache worldwide has changed. Geographical routing and split DNS can also produce intentionally different answers.

Use host for other record types

Specify the intended type explicitly:

host -t A example.com 8.8.8.8
host -t MX example.com 1.1.1.1
host -t NS example.com 8.8.8.8

Repeat checks with Bash

This loop queries two public resolvers:

for resolver in 8.8.8.8 1.1.1.1; do
    printf 'Resolver: %s\n' "$resolver"
    dig "@$resolver" example.com A
 done

Investigate persistent differences

The old record’s TTL determines how long a cached answer may remain. Negative responses can also be cached.

Use dig example.com A +trace to investigate delegation where your network permits direct DNS queries. Flushing your computer’s cache does not clear a public resolver’s cache, and is unnecessary for a direct query to a named authoritative server.