Steve Fenton

Lookup DNS on a specific nameserver with NSLOOKUP

The nslookup command is really easy to use. You just type nslookup [host-name] and you get an answer. But what do you do when it looks like it is working, but your monitoring is detecting intermittent issues connecting to a website? The answer is, you check each nameserver individually to make sure they are all giving out the same answer.

Find the nameservers with NSLOOKUP

Let’s look up the nameservers for our website. We’ll usually get back multiple answers. Two or three is pretty common. We can use nslookup -querytype=ns [root domain] to do this.

C:\>nslookup -querytype=ns
Server:  UnKnown

Non-authoritative answer:       nameserver =       nameserver =

Check each nameserver with NSLOOKUP

This is how you look up records from a specific name server. It uses the syntax nslookup [host-name] [nameserver]. You can supply the name of the nameserver: nslookup, or its IP address: nslookup 2a06:98c1:50::ac40:2065.

Address:  2a06:98c1:50::ac40:2065


Repeat this for each nameserver and keep an eye out for any that are giving out bad answers.


And finally, some quick nslookup tips.

Simple DNS Check

nslookup [host-name]

Specific Record Type Check

nslookup -querytype=[record-type] [host-name]
nslookup -querytype=mx

Nameserver Lookup

nslookup -querytype=ns [host-name]
nslookup -querytype=ns

DNS Check Against Specific Nameserver

nslookup [host-name] [nameserver]

Written by Steve Fenton on