How Do I Use The NSLOOKUP Tool In The Command Prompt Or Terminal? (2024)

Microsoft Windows includes a tool called NSLOOKUP that you can use via the command prompt. This tool can be used to check DNS records propagation and resolution using different servers and perform other troubleshooting steps.

  1. Open Command prompt. Read the Knowledge Base article What Is A Command Prompt? for instructions on how to do it.
  2. Type nslookup and hit Enter. The displayed information will be your local DNS server and its IP address. You can specify the DNS server (IP address), type of record, and domain name.

    Note: all the screenshots below are for Windows OS but the same commands will work in Terminal for Mac.

    How Do I Use The NSLOOKUP Tool In The Command Prompt Or Terminal? (1)

  3. Type nslookup domain_name and the command will return the A record for the domain you ran a query for.

    How Do I Use The NSLOOKUP Tool In The Command Prompt Or Terminal? (2)

  4. Type nslookup -q=XXdomain_namewhere XX is a type of a DNS record and domain_nameis the domain you want to look up the record for. Some of the available types of records are MX, A, CNAME, and TXT. The records are then displayed.

    How Do I Use The NSLOOKUP Tool In The Command Prompt Or Terminal? (3)

  5. To look up the specific type of record for a domain usethe nslookup-type=record_type domain_namewhere record_type is A, CNAME, MX, PTR, NS, ANY and domain_nameis the domain you want to look up the record for.
    Example: Type nslookup -type=ns domain_name where domain_name is the domain for your query and hit Enter.The tool will display the name servers for the domain you specified.

    How Do I Use The NSLOOKUP Tool In The Command Prompt Or Terminal? (4)

Notes:

  • If you type help or ? you will see the list of all commands.
  • By pressing theUp and Down arrows you can select previously entered commands.

Is this answer helpful?

Haven't found what you're looking for? Search the Support Center!

Print Article

Article Information

Article ID: 24552

Last updated on: 10/11/2023 10:28 AM

Product: {{item.Name}}{{$index < (answer.Products.length-1) ? ', ' : ''}}

Internal Only

Partner Article

Tags: {{item.trim()}}{{$index < (answer.Keywords.length-1) ? ', ' : ''}}

Attachments:

Related Articles
How Do I Use The NSLOOKUP Tool In The Command Prompt Or Terminal? (2024)
Top Articles
Latest Posts
Article information

Author: Kerri Lueilwitz

Last Updated:

Views: 6264

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Kerri Lueilwitz

Birthday: 1992-10-31

Address: Suite 878 3699 Chantelle Roads, Colebury, NC 68599

Phone: +6111989609516

Job: Chief Farming Manager

Hobby: Mycology, Stone skipping, Dowsing, Whittling, Taxidermy, Sand art, Roller skating

Introduction: My name is Kerri Lueilwitz, I am a courageous, gentle, quaint, thankful, outstanding, brave, vast person who loves writing and wants to share my knowledge and understanding with you.