How to Query MX Records for a Mail Domain

In this lab, we will check what are the MX records for a given mail domain are, using both command-line and online web based tools. Determining MX records for a mail domain is specially important in troubleshooting mail flow.

We will use dalaris as an example. First, we will use the command-line tool for querying the MX records for

Launch command prompt by clicking the start button and type CMD in the search box. Press Enter for the command windows to pop up. Type the following commands:

set type=mx

As you can see from the result below, there are two MX records for the mail domain They are and The first record ( has lower preference number of 10 which is a higher priority record whereas the second one ( has a higher preference number of 20 which implies that it has a lower priority. This means mail send from the Internet to will first be routed to the host at Should this host be down, mail would be then routed to the second prioritized mail exchanger, which is in this case.

To use an online web based tool for checking MX records, we launch our favourite browser, go to the URL Type in the MX Lookup text box the domain name (in our case, it is Click the orange MX Lookup button. The result will show up.

As you can see, the online web base tool provides the same functionality with the command line tool; however, at times you do not have the command line tool on hand, such as when you are on the road. Checking the web base tool from your mobile device is a great idea.