AlgoMaster Logo

Debugging DNS with dig and nslookup

Medium Priority43 min readUpdated August 14, 2026

DNS failures often appear as application failures:

The fastest way to investigate is to stop treating “DNS” as one component. Record the exact name and record type, identify the resolver being queried, inspect the full response, and compare one layer at a time.

Two command-line tools are widely used for this work:

  • dig exposes DNS message sections, flags, status codes, TTLs, server selection, and transport controls.
  • nslookup provides portable basic lookups and is commonly available on Windows as well as Unix-like systems.

dig is usually the stronger diagnostic tool. nslookup remains useful when it is the tool available on the affected system.

Premium Content

Subscribe to unlock full access to this content and more premium articles.