How to Check MX Record Using nslookup Command on Windows

nslookup is a command-line tool for network administrator and system administrator that available in many computer operating systems such as linux and windows for querying the Domain Name System (DNS). nslookup can obtain domain name or IP address or for any other specific DNS record. In this post, i will share how nslookup command will useful to check MX record on windows command prompt.

Open windows command prompt and enter “nslookup” command :

C:\>nslookup
Default Server:  google-public-dns-a.google.com
Address:  8.8.8.8

> set type=mx

or
Alternatively, you can run “set q=mx” which will return you the same result with “set type=mx” command :

C:\>nslookup
Default Server:  google-public-dns-a.google.com
Address:  8.8.8.8

> set q=mx

After entering “set typ=mx” or “set q=mx”, you can proceed to enter the domain name that you want to check it’s mx records. In this example, i will share the mx records for gmail.com, yahoo.com and bloggermy.com.

READ  How to Configure FTP Server in Linux RHEL 6

Check MX records for gmail.com

> gmail.com
Server:  google-public-dns-a.google.com
Address:  8.8.8.8

Non-authoritative answer:
gmail.com       MX preference = 30, mail exchanger = alt3.gmail-smtp-in.l.google.com
gmail.com       MX preference = 5, mail exchanger = gmail-smtp-in.l.google.com
gmail.com       MX preference = 40, mail exchanger = alt4.gmail-smtp-in.l.google.com
gmail.com       MX preference = 20, mail exchanger = alt2.gmail-smtp-in.l.google.com
gmail.com       MX preference = 10, mail exchanger = alt1.gmail-smtp-in.l.google.com

Check MX records for yahoo.com

> yahoo.com
Server:  google-public-dns-a.google.com
Address:  8.8.8.8

Non-authoritative answer:
yahoo.com       MX preference = 1, mail exchanger = mta5.am0.yahoodns.net
yahoo.com       MX preference = 1, mail exchanger = mta6.am0.yahoodns.net
yahoo.com       MX preference = 1, mail exchanger = mta7.am0.yahoodns.net

Check MX records for bloggermy.com

> bloggermy.com
Server:  google-public-dns-a.google.com
Address:  8.8.8.8

Non-authoritative answer:
bloggermy.com   MX preference = 5, mail exchanger = ALT1.ASPMX.L.GOOGLE.com
bloggermy.com   MX preference = 5, mail exchanger = ALT2.ASPMX.L.GOOGLE.com
bloggermy.com   MX preference = 10, mail exchanger = ASPMX2.GOOGLEMAIL.com
bloggermy.com   MX preference = 10, mail exchanger = ASPMX3.GOOGLEMAIL.com
bloggermy.com   MX preference = 0, mail exchanger = bloggermy.com
bloggermy.com   MX preference = 1, mail exchanger = ASPMX.L.GOOGLE.com
2 comments
  1. John S.
    John S.
    April 23, 2012 at 10:13 am

    Is there way using NSLOOKUP to always return information from an authoritative server? It would spend things up a lot for me, if I can do it in a command line prompt. Currently I use http://www.unlocktheinbox.com/dnslookup/ , because it goes against the authoritative server. I know I can do it manually, but it’s like 4 steps for each server I look up and it’s just faster using an online took in my case. 

    Reply
  2. Gary Gillespie
    Gary Gillespie
    January 11, 2017 at 3:09 am

    Do you honestly expect a person who simply uses gmail to understand all this gibberish? It is far too difficult for a non-literate computer user to fathom what I’m supposed to do to correct my gmail problem…that being the inability to send messages to known recipients.

    Reply
Leave a Reply

Your email address will not be published. Required fields are marked *

SiteGround.com

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.

TRY FREE

* up to 30 days money back guarantee