Nslookup is a network administration command-line tool designed for retrieving information about Domain Name System (DNS) records. DNS is responsible for translating domain names into IP addresses, allowing users to access websites and resources by using human-readable names (e.g., www.example.com) instead of numerical IP addresses.
Open Command Prompt or Terminal: Press Windows key + R
, type cmd
, and press Enter to open Command Prompt on Windows. On macOS or Linux, open Terminal.
Running Nslookup: To start using Nslookup, type nslookup
and hit Enter. You’ll now see the >
prompt, indicating you are in Nslookup mode.
Query DNS Records: In Nslookup mode, you can query different types of DNS records by typing the record type followed by the domain name. For instance, to find the A (address) record of www.example.com, type A www.example.com
. To exit Nslookup mode, type exit
.
Below are some of the most-commonly queried DNS record types:
If you want to find the A (IPv4) record for example.com, follow these steps:
nslookup
and hit EnterA example.com
and hit EnterThis will return the IPv4 address associated with the domain name example.com.