What Is Mx Record & How To Setup Mx Record
Configure Mail Exchange Records in Exchange Server
Table of Contents
What Is Mail Exchange Records (Mx Record)
If you have a question about what an MX record is in DNS, how it works, and how to set up an 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, the Mx record is used as a mail exchanger.
It determines the IP address of the host machine where emails have to be sent.
By setting an It is a DNS, you tell the server where the email should land.
Setting up this info in DNS is necessary to receive emails from other domains.
How MX Record Works
Let’s take an easy example: Suppose you have a domain abc.com.
So, you have an email address on that domain for example info@abc.com
Whenever the external user sends an email to info@abc.com it will do a query to a DNS server.
Therefore, first It looks for an authoritative name server for abc.com.
Usually, this name server is provided by a service provider like GoDaddy from where you bought your domain.
Once the query reaches the domain name “abc.com”
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 an external user gets the IP address of the server, where it can land.
Finally, the email lands in the inbox of info@abc.com
If this record is not present, then your domain abc.com cannot receive an email.
Note: If you are using an exchange server internally.
You may send 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, that you have multiple records, then how does email understand where to go?
That’s the MX record priority that comes into play.
It decides which IP should be used first to deliver emails.
The lowest 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 abc.com is Mail.abc.com, use the below command to know the IP
Example: nslookup mail.abc.com
How To Setup Mail Exchange Records
You can log in to the service provider portal for the DNS management.
For Example in my case, I have a domain techijack.in
I want my email URL to be mail.techijack.in.
First, create a host 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 MX
Now put the domain name or @ in a name field and type mail.abc.com in the content field.
As I am using Cloudflare DNS so my record appears below
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 Mail Exchange Records Setup In Exchange
How to Find Mx Record for Your Exchange
Pointing Mail Exchange Records in the correct direction is necessary to receive emails from the outside world.
If you have configured the load balancer for the high availability of your Mail Exchange Records.
you must set the priority for the primary server, reminding you the lowest priority has high preferences.
Therefore, you can log on to the Mxtoolbox website to check where the Mail Exchange Records are pointing for your Exchange Server.
To check your Mx record Visit Mxtoolbox
Watch the below video to configure it for your exchange server.