nslookup ( Name Server Lookup ) is a network administration Command-Line tool 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).

1> Find out “A” record (IP address) of Domain

Above command query domain www.google.com with
public DNS server and below section shows Non-authoritative answer: displays A record of www.google.com

nslookup www.google.com

2> Find out Specific Domain Lookup


 nslookup web.mit.edu


3> Find out Reverse Domain Lookup 


4> Find out NS (Name Server) Record

nslookup -query=ns www.google.com


5> Find out MX (Mail Exchange) Record 

nslookup -query=mx www.google.com

MX record is being used to map a domain name to a list of mail exchange servers for that domain. So that it tells that whatever mail received/sent to @gmail.com will be routed to mail server.

6> Find out SOA (Start of Authority) Record

nslookup -type=soa www.google.com

7> Find out All Available DNS Record 

nslookup -query=any www.google.com

8> Enable Debug Mode

To enable Debug Mode ‘set debug’ will return you verbose information like TTL, here’s the output.

nslookup -debug www.google.com