ID #1046

How to setup DNS to have an email server (MX) for my domain?

The reason an email is able to reach the destination email server is because the DNS of the domain tells what is the MX (Mail Exchanger) for the domain. It is easy to find a domain's MX servers by DOS/Linux command nslookup. For example, to find out what are the email servers for, you can use the following command

c:>  nslookup -type=mx


  Address: mail exchanger = 2 mail exchanger = 1

The output tells you that the primary mail exchanger (MX) to receive emails for is When is down. The email will be routed to instead. Every MX has numeric preference# assigned. The lowest number appoints the mail server as primary mail server. Emails will only be routed to MX with higher preference# when the lower MX are not available.


To setup MX for your domain, you need to open the DNS for your domain. You should see the MX Records(MX) at the top of the DNS Panel. You can click on Add MX link to enter the MX for your domain. You then assign the mail server with a numeric preference number. Multiple email servers are allowed; however, the one with the lowest preference number will become the primary email server for the domain.


Note that the MX can not be IP address. It is common that you always create a hostname, like, assign it with the IP of the server and use as the MX of the domain. To add a host, click on Add Host at the DNS Panel for the domain. If you have dynamic IP for the mail server, then you just need to use our dynamic DNS client to update your hostname and you will be still able to run email server under dynamic IP addresses.

After submitting the changes of the DNS for your domain, wait for a about 2 minutes. Then run the following DOS/Linux command to check what are the mail exchange servers for the domain name:
c:\> nslookup -type=mx

We provide Mail Relay Testing Tool that you can use to test if you mail server is configured correctly to accept emails for your domain.


Tags: Mail Server, MX

Related entries:

You cannot comment on this entry