How to Use nslookup to Find IP Address

nslookup is a network administration command-line tool for querying the Domain Name System (DNS) to obtain the mapping between domain names and IP addresses. It takes in two parameters, first being an input of either “domain” or “server”, followed by text that will be translated into its correct address on request. Inputting ‘nslookup’ would yield Google’s server IP address. nslookup can also be used for troubleshooting network problems, and nslookup is a very useful tool when using nslookup to find IP address. You can use nslookup to troubleshoot DNS related problems with the help of a simple command. The tool is available in Windows, Mac OSX and many Linux distributions including Debian & Ubuntu. You can also use nslookup online tool like the one provided by You can use it in interactive and non-interactive mode, which means the program will wait for input from your keyboard or not. To use nslookup just type nslookup and hit the enter key. The nslookup program will prompt you to provide some details. If your query is nslookup a website name, then type nslookup followed by the website name such as


and hit Enter
In this example we are going to use nslookup to find out the IP address of a host. We will also look up email servers for that domain, and maybe even some other useful information like who runs it or what programming language is used on the site. If I wanted to know what my favorite website looks like from an outside perspective, then all I need it type nslookup at the command prompt and enter The result will tell me its IP Address of the site. When trying to figure out what’s going wrong with DNS on your Mac computer or iPhone (or iPad), it isn’t always obvious which IP address was assigned as its default Domain Name Server (DNS).

By default NSLookUp will use any previously configured DNS servers but if none exist or they’re not working either proceed by performing some investigation: open system preferences , click on Network and select your active network connection (either Wi-Fi or Ethernet). If you have more than one active interface, select the one you’re using to access the Internet. When connected you should see that an IP address has been assigned as well as how it was obtained (eg: DHCP). If it is shown as ‘Configured’ then you’re either using DHCP or static IPs two options that are automatically set in system preferences.

Command line options for using nslookup

H:\>nslookup /?
nslookup [-opt ...] # interactive mode using default server
nslookup [-opt ...] - server # interactive mode using 'server'
nslookup [-opt ...] host # just look up 'host' using default server
nslookup [-opt ...] host server # just look up 'host' using 'server'


Usage Examples of Using nslookup command

Check domain name ( on specific DNS server (


Non-authoritative answer:

Check MX records (mail server) on specific domain (

H:\>nslookup -querytype=mx 
Non-authoritative answer: 
MX preference = 10, mail exchanger = 
MX preference = 50, mail exchanger = 

Check ALL records on specific domain ( Long output!

H:\>nslookup -type=any

Non-authoritative answer: MX preference = 10, mail exchanger = MX preference = 10, mail exchanger =
primary name server =
responsible mail addr =
serial = 1
refresh = 7200 (2 hours)
retry = 900 (15 mins)
expire = 1209600 (14 days)
default TTL = 86400 (1 day) nameserver = nameserver = nameserver = nameserver = internet address = internet address =

nslookup is a useful tool for network administrators and use to find ip address. we can also used it for troubleshooting network problems. If you want to become IT specialist then you have to learn all about this tools, if a DNS-related problem should occur in your server or workstation than you try solving it by yourself using this and other networking tools.