How to check DNS using CMD or terminal?


How to check DNS using CMD or terminal?

You are here:
  • Main
  • FAQs
  • How to check DNS using CMD or terminal?
< All Topics
Table of Contents

To open cmd, go to start > run > cmd

Type command nslookup, press enter

Run these command now.

set type=a , press enter
domain name

set type= MX , press enter
domain name

Set type=ns , press enter
domain name

set type=cname, press enter
domain name

set type=any (this command will show all DNS records, like MX, A, nameservers, SPF record.)
domain name

For, Macos and linux OS you can use “Dig” command

To open terminal on macos X, click Applications, click Utilities, and then click Terminal

For Linux, open a terminal window.

In general, dig shows A record, if you want to check another DNS record You need to add the DNS record name at end of the command.

EX:-

dig domainname.com mx

dig domainname.com cname

dig domainname.com ns

dig domainname.com any