Exchange Server 2016Microsoft

What Is Mx Record & How To Setup Mx Record

Know More About DNS Record & How It Works

What Is Mx Record 

If you have a question about what is MX record in DNS, how it works and how to setup MX record.

We will discuss this post about it and will see how we can set up this in exchange.

In a simple and easy word, Mx record is used as a mail exchanger.

It determines the IP address of the host machine where emails have to be sent.

Basically, by setting an It is a DNS, you tell the server where email should land.

It is necessary to set up this info to DNS in order to receive emails from other domains.


How MX Record Works

Let’s take an easy example: Suppose you have a domain

So, you have an email address on that domain for example

Whenever the external user sends an email to it will do a query to a DNS server.

Therefore, first It looks for an authoritative name server for

Usually, this name server is provided by the service provider like GoDaddy from where you bought your domain.

Once the query reaches to the domain name “

It looks for this entry in a DNS zone file of that domain.

An MX record is an entry in the DNS zone pointing to the IP of your server, where emails are hosted.

Now sent email from external user gets the IP address of the server, where it can land.

Finally, email lands to the inbox of

If this record is not present, then your domain cannot receive an email.

Note: If you are using an exchange server internally.

You may sent and receive emails but not from external users.


What Is Mx Priority

You can configure multiple MX records for your domain name.

Having multiple records in your GoDaddy DNS can work as a backup.

Now, you have multiple records, then how email understands where to go.

That’s the MX record priority come into a play.

It decides which IP should be used first to deliver emails.

The lowes priority 0, means the highest preference.

The highest priority 10 means lower preference.

Now if you set the IP (x.x.x.x) to 0 priority.

The email will be delivered to the IP having the lowest priority.

If you are thinking what is my MX record and want to know the IP address of this.

You can use the command nslookup to determine your record.

MX record example for is, use the below command to know the IP

Example: nslookup


How To Setup Mx Record

You can log in to the service provider portal for the DNS management.

For Example in my case, I have a domain

I want my email URL to be

First, create a host a record by the name of the mail and point it to the email server IP.

If you are using NAT or Firewall, Put the public IP of your router or firewall.

Second Create a new record and select the type as MX

Now put the domain name or @ in a name field and type in the content field.

As I am using Cloudflare DNS so my record appears as below

what is mx record

Additional Info: 

There can be a different service provider for the domain.

So, you have to contact your domain provider to manage the DNS.

DNS propagation can take some time like around 24-48 hrs to propagate.

Exchange is highly dependent on DNS and it should be configured properly.

For MX Record Setup In Exchange

To check your Mx record Vist Mxtoolbox

Watch the below video to configure it for your exchange server.

Back to top button