How do I do a DNS lookup in CMD?
Chloe Ramirez
Updated on April 19, 2026
- Launch Windows Command Prompt by navigating to Start > Command Prompt or via Run > CMD.
- Type NSLOOKUP and hit Enter.
- Set the DNS Record type you wish to lookup by typing set type=## where ## is the record type, then hit Enter.
- Now enter the domain name you wish to query then hit Enter..
Subsequently, one may also ask, how do I do a reverse lookup in CMD?
Forward-Reverse Lookup via Command Line
- Step 1: Reverse Lookup. So whatever you're using, open the program and enter the following command: host 64.207.179.70. ..which returns the correct domain name for my server:
- Step 2: Forward Lookup. Next, we want to verify that the domain name matches the IP addressed used in step 1.
Also Know, what is lookup command? nslookup command. nslookup (name server lookup) is a tool used to perform DNS lookups in Linux. It is used to display DNS details, such as the IP address of a particular computer, the MX records for a domain or the NS servers of a domain. nslookup can operate in two modes: interactive and non-interactive.
Just so, how do I find my DNS IP?
Querying DNS Click the Windows Start button, then "All Programs" and "Accessories." Right-click on "Command Prompt" and choose "Run as Administrator." Type "nslookup %ipaddress%" in the black box that appears on the screen, substituting %ipaddress% with the IP address for which you want to find the hostname.
How do I reverse nslookup?
- If you want to use interactive nslookup, then at the nslookup prompt type "set q=ptr" and then enter the IP on the next line.
- No need to -type=ptr or set q=ptr at all - nslookup is clever enough to regonise an IP address and do a reverse lookup instead of forward – abstrask Sep 4 '14 at 21:04.
Related Question Answers
How do I find my hostname in CMD?
To find your hostname and physical address using the Windows Command Prompt:- Open the Command Prompt window by clicking on Start > (All) Programs > Accessories > Command Prompt.
- Type ipconfig /all and press the Enter key.
How do I do a forward and reverse DNS lookup?
Run the echo command to retrieve the IP addresses in use by the cluster. Record the IP addresses for each network interface card in use by the cluster. For each IP address you recorded in the previous step, run the host command to verify that DNS reverse lookup returns the fully qualified domain name (FQDN).What is nslookup?
nslookup is a network administration command-line tool available in many computer operating systems for querying the Domain Name System (DNS) to obtain domain name or IP address mapping, or other DNS records.How do I check DNS issues?
Check IP configuration Run ipconfig /all at a command prompt, and verify the IP address, subnet mask, and default gateway. Check whether the DNS server is authoritative for the name that is being looked up. If so, see Checking for problems with authoritative data.How do I check my DNS settings?
Check DNS Settings in Windows- Open the Control Panel by clicking on the Windows button, then click Control Panel.
- Type "Network and Sharing" in the upper right hand corner and click on Network and Sharing Center.
- Click Change Adapter Settings.