• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
NSLookup \windows\system32\nslookup.exe

Perform a Domain Name Server (DNS) lookup, used to convert domain names to IP addresses, and vice versa.

To Open

Command Prompt nslookup


nslookup address


When you type a web address into a browser’s address bar and press Enter, Windows looks up the server name to determine the corresponding IP address. Then the IP address is used to initiate communication with the server. If the lookup fails, either because the name servers (the machines containing the DNS lookup tables) are down or because the specified domain does not exist, the connection attempt will fail as well.

NSLookup is a simple tool that allows you to look up the IP address of any domain name or server name, as well as find the server name associated with any particular IP address. To use NSLookup, just specify the domain name at the prompt, like this:

c:\> nslookup annoyances.org
Name:    annoyances.org

Likewise, you can specify an IP address and NSLookup will report the associated domain (called a reverse lookup):

c:\> nslookup
Name:    www.oreilly.com


  • Every time you initiate communication with a server, there will be a delay while Windows performs an NSLookup. To eliminate the delay, use NSLookup to determine the IP address and then replace the reference with the IP address. This is especially useful with applications that frequently access the same server; for example, use an IP address as the mail server in your email program (or as the server name in your web browser homepage) for the best performance.

  • Most Internet service providers employ at least two name servers, which are used for lookups for all of their customers. If one goes down, the other takes up the slack. However, if both name servers are down for some reason, or even just performing poorly, it can disable most Internet communication. If, however, you use IP addresses as described in the previous note, you eliminate your susceptibility to this problem.

  • Since NSLookup, as well as the automatic lookups performed behind the scenes, all depend on your ISP’s name servers, they are susceptible to receiving outdated information. If you’re having trouble accessing a particular server, you can use an NSLookup gateway to double check your findings. An NSLookup gateway is simply a web-enabled version of NSLookup. It can also be used to perform lookups; however, if the gateway site is outside your Internet service provider, it will use its own name servers and therefore may provide more up-to-date information. To find such a site, perform a web search for "NSLookup gateway.”

  • NSLookup also performs a lookup of the IP address of your local computer and displays it before performing the requested look up. In many cases, though, it will fail, which means that you may see an error message every time you run NSLookup (such as “Can’t find server name...”). However, this won’t interfere with NSLookup’s primary function.

  • Windows caches some lookups, which means that you may see outdated information. To flush the cache, type ipconfig /flushdns at the command prompt. See “Windows IP Configuration”, later in this chapter, for more information.

See Also

“Ping”, “Tracert”, “Windows IP Configuration”

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint