How to check DNS using CMD?

DNS lookup

There are many online tools to check DNS records like intodns, but sometimes they did not provide accurate results. However, you can check DNS using CMD, let discuss How to check DNS using CMD?

Let’s check DNS using CMD….

1.) open command prompt by pressing windows key + R and type CMD


2.) Type nslookup and press enter

How to check DNS using CMD?


Are you thinking what does nslookup, Right? nslookup is a network administration command-line tool available in All OS to query the DNS to obtain a domain name or IP address mapping, and DNS records. “nslookup” means name server lookup.

2.) To check A record use “set type=A” and press enter, then mention a domain name you want to check A record.


-> You will get an A record after running this command, you can get MX, Cname, AAA DNS record, Cname command shows you primary nameserver on your domain.

Here is all the DNS command list you can save it by copy and paste or you can download the DNS command text file here.

>set type=a
>domain name

Set type=MX will display your email service provider records, in rare cases we use third part paid email service we can’t remember who is our email service provider but if we have the email service provider’s MX record, it might help us to find them.

>set type= MX
domain name

set type=ns will show you primary and secondary DNS root nameserver of your domain to manage other DNS records.

>set type=ns
>domain name

Set type=cname uses for getting the Cname we have set in our DNS panel. Sometimes we have set multiple Cname for email, www also Cloudflare set www Cname for caching purposes.

>set type=cname
>domain name

If you want to get all DNS records of your domain, you can use set type=any command and it will be displayed you all DNS records rest of TXT/SPF, DKIM, DMARC.

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

Tagged :