Back to commands

Web Server Rescue

Read-only

Compare DNS Answers Across Resolvers

Users in different places reach different edge IPs, and you need to compare recursive resolver answers before touching the web server.

Command

for r in 1.1.1.1 8.8.8.8 9.9.9.9; do printf '%s ' "$r"; dig @"$r" +short example.com A; done

Before you run this

System impact: Read-only. Low when scoped to the shown target.

When not to use it: Do not assume public resolver agreement proves every ISP, corporate resolver, or local cache has updated.

Expected output

Resolver IPs followed by the A record each resolver returns; disagreement points to cache or propagation behavior, not necessarily a broken server.

System impact

Read-only. Nothing changes. The command sends read-only DNS queries to public resolvers.

Recovery / rollback: no state is changed.

When to use it

Use during DNS cutovers, CDN moves, or reports that only some users still reach the old IP.

When not to use it

Do not assume public resolver agreement proves every ISP, corporate resolver, or local cache has updated.

next steps

Related commands

Web Server Rescue Read-only

Compare Authoritative Nameserver Answers

The recursive resolver was not the problem. One nameserver disagreed.

for ns in $(dig +short NS example.com); do printf '%s ' "$ns"; dig @"$ns" +short example.com A; done
Web Server Rescue Read-only

Compare A and AAAA Records

IPv4 worked. IPv6 sent users to a different edge.

printf 'A '; dig +short example.com A; printf 'AAAA '; dig +short example.com AAAA
Web Server Rescue Read-only

Show the DNS Answer TTL

The fix was correct. The TTL explained why users still saw the old edge.

dig +noall +answer example.com A
Web Server Rescue Read-only

Check the WWW CNAME Target

The apex was right. The www name pointed through a different path.

dig +short www.example.com CNAME
Study mapping

Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.

  • LPIC-1 style command-line practice
  • LFCS style performance-task practice
  • Linux+ style troubleshooting review

Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.