Support article
MX Record
An MX Record (Mail Exchange) is a type of record in the Domain Name System (DNS) that specifies a mail server that is authorized to...
An MX Record (Mail Exchange) is a type of record in the Domain Name System (DNS) that specifies a mail server that is authorized to receive email on behalf of a domain. This record is fundamental for directing the flow of emails to and from a domain, ensuring that email messages reach their correct destination.
Features and function of the MX Record:
- Directing mail traffic: MX records direct incoming mail to the mail servers specified for a domain. When an email is sent, the sending server queries DNS for the MX records of the recipient’s domain and then sends the message to the server specified in the record.
- Prioritization: A domain can have multiple MX records, each with a specific priority. These priority values determine the order in which mail servers should be contacted. The server with the lowest priority value is tried first. If that server is not available, the next server with the next lowest value is tried, and so on.
- MX record format: An MX record includes a priority (an integer) and the hostname of the mail server. It does not include IP addresses directly; instead, the specified hostname must have A or AAAA records that resolve to an IP address.
Example of how to configure an MX Record:
Suppose you want to configure email for the domain ejemplo.com. You could set the following MX records in your DNS:
ejemplo.com. 3600 IN MX 10 mail1.ejemplo.com. ejemplo.com. 3600 IN MX 20 mail2.ejemplo.com.
In this example:
- 3600 is the TTL (Time to Live), which indicates how many seconds caching servers can store information about this record.
- IN indicates that it is an Internet record.
- MX indicates that it is a mail exchange record.
- 10 and 20 are the priority values for the mail servers. mail1.ejemplo.com has the highest priority (10) and will be the first server tried. mail2.ejemplo.com serves as a backup with a lower priority (20).
Importance of MX records:
- Email routing: MX records are crucial for ensuring that all emails sent to addresses under a specific domain reach their proper destination.
- Resilience and redundancy: By allowing multiple MX records with different priorities, a domain can have redundant mail server configurations, increasing the reliability and availability of the email service.
- Email management flexibility: MX records allow email to be handled by servers separate from the servers that handle web traffic, offering flexibility in how Internet services are managed for a domain.
MX records are essential for email administration on any domain and must be configured carefully to ensure efficient and reliable email delivery.