Here's What the NSLOOKUP Tool Can Tell You About Internet Domains

What the nslookup Command Does and How to Use It in Windows

Mechanic using laptop at tire shop
A person using NSLOOKUP. Portra / Getty Images

nslookup (which stands for name server lookup) is a network utility program used to obtain information about internet servers. As its name suggests, it finds name server information for domains by querying the Domain Name System (DNS).

Most computer operating systems include a built-in command line program with the same name. Some network providers also host web-based services of this same utility (like These programs are all designed to perform name server lookups against specified domains.

How to Use nslookup in Windows

To use the Windows version of nslookup, open Command Prompt and type nslookup to get a result similar to this one but with entries for the DNS server and IP address that your computer is using:

C:\> nslookup

This command identifies which DNS server the computer is currently configured to use for its DNS lookups. As the example shows, this computer is using an OpenDNS DNS server.

Take note of the small > at the bottom of the command's output. nslookup remains running in the background after the command is issued. The prompt at the end of the output lets you enter additional parameters.

Either type the domain name you want the nslookup details for or exit nslookup with the exit command (or the Ctrl+C keyboard shortcut) to go at it a different way. You could instead use nslookup by typing the command before the domain, all on the same line, like nslookup

Here's an example output:

> nslookup
Non-authoritative answer:

Nameserver Lookup

In DNS, so-called "non-authoritative answers" refer to DNS records kept on third-party DNS servers, which they obtained from the "authoritative" servers that provide the original source of the data.

Here's how to get that information (assuming you've already typed nslookup into Command Prompt):

>set type=ns
[...] internet address = internet address = internet address = internet address = internet address = internet address = internet address = internet address =

An authoritative address lookup can be performed by specifying one of the domain's registered nameservers. nslookup then uses that server instead of the default DNS server information of the local system.


The output no longer mentions "non-authoritative" data because the nameserver ns1.p30.dynect is a primary nameserver for, as listed in the "NS record" portion of its DNS entries.

Mail Server Lookup

To search for mail server information on a particular domain, nslookup utilizes the MX record feature of DNS. Some sites, like, support both primary and backup servers.

Mail server queries for work like this:

> set type=mx
Non-authoritative answer: MX preference = 20, mail exchanger = MX preference = 10, mail exchanger = MX preference = 50, mail exchanger = MX preference = 40, mail exchanger = MX preference = 30, mail exchanger =

Other nslookup Queries

nslookup supports querying against other less commonly used DNS records including CNAME, PTR, and SOA. Typing a question mark (?) at the prompt prints the program's help instructions.

Some web-based variations of the utility offer a few additional features beyond the standard parameters found within the Windows tool.

How to Use Online nslookup Tools

Online nslookup utilities, like the one from, lets you customize a lot more than what's allowed with the command from Windows.

For example, after choosing the domain, server, and port, you can pick from a drop-down list of query types like address, nameserver, canonical name, start of authority, mailbox domain, mail group member, well-known services, mail exchange, ISDN address, NSAP address and many others.

You can also pick the query class; internet, CHAOS or Hesiod.