MX Records, or Mail Exchange records are DNS records that are necessary for delivery of emails to any address. In essence, the MX record exists so that anyone can understand which server your mail should be delivered to, and where the emails which are sent to your domain should be routed to. Without MX record functioning in the right manner, you will not receive any email.
If you are changing your MX records, it not only changes the address of your email – the location where the mail would be pointed to in order to be delivered would also change.
Parts of an MX Record
There are broadly two parts to any MX record, both of which are essential for delivering emails to your inbox.
An example of an MX record can be: 0 mail.example.com
In this case, the ‘0’ represents the priority of that particular server. The lower that number is, the higher the priority for that domain is.
Here is a DNS lookup for the google.com domain.
google.com MX preference = 30, mail exchanger = alt2.aspmx.l.google.com
google.com MX preference = 50, mail exchanger = alt4.aspmx.l.google.com
google.com MX preference = 40, mail exchanger = alt3.aspmx.l.google.com
google.com MX preference = 20, mail exchanger = alt1.aspmx.l.google.com
google.com MX preference = 10, mail exchanger = aspmx.l.google.com
alt2.aspmx.l.google.com internet address = 188.8.131.52
alt1.aspmx.l.google.com internet address = 184.108.40.206
aspmx.l.google.com internet address = 220.127.116.11
The next part, ‘mail.example.com’ represents the actual address of the server which needs to be connected in order to reach your inbox. The actual address varies depending on which company hosts your email. The priority is used to determine which MX server to connect to first, in order to get to your inbox. If there are multiple addresses with the same priority, it simply connects to one at random. You can also change your MX records from the existing one if you deem it necessary.