Diagnose DNS Problems with nslookup

Resolve a domain manually and see which DNS server answers — the first test when a site won't load.

WindowsnetworkcmdDNSLow risk
Run `nslookup example.com` to resolve a name; add `nslookup -type=MX gmail.com` to check mail records.

01Command

Command
$ nslookup example.com  ::  query a specific record type:  nslookup -type=MX gmail.com

02What it does

nslookup prints both the DNS server it queried and the answer, so you can immediately tell whether the failure is DNS or the website itself. If the default server is your router and times out, query a public resolver directly (nslookup example.com 1.1.1.1) to compare. The -type option queries MX, TXT, NS, or other record types without entering interactive mode.

03Risk

RiskLow risk
RequirementsBuilt into Windows 10/11.
!Warning: A successful nslookup only proves DNS works — the site itself can still be down.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • nslookup
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Reference documents nslookup usage and options including "set type=<record type>" for querying specific DNS record types.
  • Nslookup — Name server lookup
    SS64 · technical · 2026-09-17
    Evidence: Documents nslookup syntax and interactive commands such as set type= for MX/A/TXT queries.

Last verified: 2026-09-19 · Category: Network

06Related solutions