Interview Prep/Networking/DNS & Service Discovery

How do you find which nameservers are authoritative for a domain and query them directly?

BeginnerScenarioDNS & Service Discovery
Answer

Situation read → Troubleshooting basics with dig.

What I'd do →

  1. Run dig NS example.com +short
  2. Query one directly: dig @ns1.example.com www.example.com to bypass caches
  3. Compare answers with a public resolver: dig @1.1.1.1 www.example.com
  4. Look at the flags for aa (authoritative answer)
  5. Use dig +trace to see the delegation chain

Why → Querying the authority directly separates "the record is wrong" from "a cache has stale data".

Interview tip → Say that comparing authoritative and recursive answers is your first move for any "DNS is wrong" ticket.

All Networking questions Roadmap: Networking for DevOps

More on DNS & Service Discovery