Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have configured my nameserver, and I want to test it before letting it go online. So, how could I say that a specific domain (let's say should be resolve using a specific nameserver (let's say I expect some local configuration, because I don't want others to use this nameserver, of-course.

share|improve this question
  1. If you don't already know the FQDN of the nameserver(s) for, then go to and do a WHOIS lookup to discover the nameservers. Let's assume they are and
  2. Using that information, and assuming your new nameserver has IP address, add/save this in your C:\Windows\System32\drivers\etc\hosts file on your test machine:

  3. Open a command prompt and type ipconfig /flushdns

  4. Using the nslookup command at the command prompt, run some tests against your new nameserver. For example, nslookup

  5. Now look at the output from nslookup. The first pair of lines indicate the nameserver that answered your request and the IP address of that nameserver. It should be the IP address of your new nameserver. The next set of lines will show the name of the machine you asked for ( and its IP address or addresses.

  6. Once you are satisfied and completed your testing, remove the entries you added to your hosts file in step 2, then repeat step 3.

share|improve this answer
up vote 1 down vote accepted

nslookup is able to do that. It would go like nslookup -debug

share|improve this answer

The simplest test you can run is just to issue queries directly against the nameserver for some zone you have already setup for testing. If it responds it is most likely all set. Its just a matter of having some test domain out there you can then assign its NS records to point to your new box.

share|improve this answer

The local configuration for overriding specific entries in the name resolution process is the hosts file, which doesn't have the flexibility needed to override a certain part of the DNS lookup process as you're looking for.

Command line tools for domain lookups have the ability to specify a certain server to query against - just use that to verify that your system is responding the way that it's expected to.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.