Skip to content

What are MX records and how do I create them?

Back to dns

MX records are used for delivering email.
So MX records are very important because this determines the route where the emails go.
If the MX record is set incorrectly, you will not receive email.

Priority
An MX record is a special type of record because it allows you to specify multiple records with different priorities. This allows you to create a fall-back in case the first mail server is offline for maintenance, for example. The mail will always be sent to the MX record with the lowest priority, if this fails the server will deliver it to the priority above it.
So the lower the priority, the sooner the mail server picks it up.
For example, an MX record with priority 0 will pick up the mail sooner than an MX record with priority 10.

Using external MX records
Note: When using external MX records (from another party) always keep in mind that you turn off the local mail server.
If you don't, the server will try to deliver the mail internally when both domains are created on the server, resulting in email being delivered to the wrong server or not being delivered at all if the email address does not exist.

How do I disable the local mail server when using external mx records?

in DirectAdmin:
1.) Login into DirectAdmin in the hosting package
2.) At the top of the menu, hover over E-mail administrator and then click on MX records.
3.) Uncheck the option, "Use this server to handle my emails."

in SATserver:
1.) Login in satserver
2.) On the left side of the menu, click on advanced.
3.) click on server features
4.) set the Mailserver to Off.

How do I create an MX record?
To create a correct MX record, you must be in possession of the hostname on which you wish to receive email. The MX record is normally applied to the domain name itself.

If you are hosting with us and want to deliver the mail to our server you do not have to worry about this, we set the MX record with us by default that the mail goes to our server.

There are 3 fields you need to fill in for an MX record:

  • Name it applies to, often this is the domain name itself.
  • Server: this is the A record that refers to the mail server, for example mail.exampledomain.com.
  • Value / Priority: enter the value here, often this is 0 or 10. If there are multiple fallback mail servers this can also be 20 / 30 / 40. .
    As indicated earlier, the higher the value the lower the priority.
Most common situations:
  • The Server field may only be a host name. (For example: mail.exampledomain.com).
  • When referring to an A record you need to create it.
  • When referring to an external mail server you need to disable the local mail server in the control panel. As mentioned before. Not doing this can cause problems, especially when the domain name you are referring to is also created on the same server.
  • When you make the DNS change (for example, the MX) then the change is made immediately. However because a TTL applies to the domain name, and because other parties often have dns caching enabled, it can sometimes take up to 1 hour for the change to take effect everywhere and in some cases even longer.

Example of setting an MX record based on an A record
A simple standard example to deliver mail to the same server:
There is an A record for mail.exampledomainname.com this refers to the ip address: 1.1.1.1
There is currently no MX record, but it is intended that the mail will be delivered to the ip address 1.1.1.1.
You can then create the MX record with priority 0 and point it to mail.exampledomainname.com.
Since the A record of mail.exampledomain.nl refers to 1.1.1.1 the mx record will send the mail to the server 1.1.1.1.

Where can I create/modify the MX record?
This depends on how you manage the DNS record.
We will give some examples below:

- Domain name uses our managed dns:
Log in to my.oxxa.com and go to Domains on the left side of the menu.
Find the domain name there, and click on the cog icon.
Here you can edit or add the MX record.

- Domain name uses SATserver's nameservers
In this case SATserver manages the DNS, and you need to log into the control panel of satserver.
Then look at DNS --> MX records. You can change or add an MX record here.

- Domain name uses ns1 / ns2 and ns3/.thednscompany nameservers
Login to DirectAdmin, cPanel or Plesk, go to the DNS editor and change or add the MX record there.

Back to dns