How to create MX mail server record

 

In order to host e-mails for a domain, you need to add an MX record for that domain name. The MX record needs to be a hostname and it is displayed in the following format:

DNS zone for domain.com

Source:               TTL:             Type:    Priority:      Destination:    

domain.com       1800    IN      MX                  1      mail.domain.com.

 

You can have several MX records with the same or different priority. If the priority is the same number for all of them, the e-mails will be distributed evenly. In case there is an MX record with lower number as priority, it will be actually the first one to use. If it fails, the next MX record with higher priority number is used.

 

If your mail server does not have a valid hostname setup, you can add an A record in your DNS zone and point it to the Mail server IP where the e-mails should land like bellow:

DNS zone for domain.com

Source:                   TTL:             Type:    Priority:       Destination:    

mail.domain.com   1800    IN         A                            10.10.10.10.

domain.com           1800    IN       MX                  1      mail.domain.com.

 

Here is an example:

hostway.com.     300 IN MX 10 hostway-com.mail.protection.outlook.com.

hostway-com.mail.protection.outlook.com.   10 IN    A       207.46.163.106