How to perform a reverse DNS lookup with nslookup

Use nslookup to do a reverse DNS lookup.

nslookup in debug mode is important for displaying additional information when querying DNS records.

By default, nslookup only displays primary name resolution information of the specified host. The information displayed would not be enough to carry out a debugging process.

When the debug mode is enabled, all information such as the set of queries used multiple servers with the responses returned by each are displayed on the screen. With this information, you can trace where a problem is coming from.

To use nslookup in debug mode, use the -debug parameter:

$ nslookup -debug my_domain_name

Let's say your querying google.com:

$ nslookup -debug google.com

Server:     192.168.224.1
Address:    192.168.224.1#53

------------
    QUESTIONS:
    google.com, type = A, class = IN
    ANSWERS:
    ->  google.com
    internet address = 216.58.223.238
    ttl = 0
    AUTHORITY RECORDS:
    ADDITIONAL RECORDS:
------------
Non-authoritative answer:
Name:   google.com
Address: 216.58.223.238
------------
    QUESTIONS:
    google.com, type = AAAA, class = IN
    ANSWERS:
    ->  google.com
    has AAAA address 2c0f:fb50:4003:802::200e
    ttl = 0
    AUTHORITY RECORDS:
    ADDITIONAL RECORDS:
------------
Name: google.com
Address: 2c0f:fb50:4003:802::200e

nslookup debug mode example with Google as domain