# MX record #### WHAT IS THE MX RECORD? Using the MX record, you can enter a domain name by which server handles the mail. The MX record is the abbreviation for Mail eXcahnge.
The server address specified in the MX record can never be an IP address, it must always be a domain name. (for example, `staffmx.dotroll.com`) You must assign a priority to the MX record, which in the case of multiple records means the order in which the sending server attempts to send the message.
Incorrect setting of the MX record may result in no mail being sent to that domain name.
For a domain name, you can set multiple MX records to increase the probability that the mail will be delivered to ensure redundancy. #### QUERYING MX RECORD For example, you can use the nslookup command in Windows to access record MX, while under Linux the host command. Example of a Windows-based nslookup query: ``` nslookup -q=MX dotroll.com Server: google-public-dns-a.google.com Address: 8.8.8.8 Non-authoritative answer: dotroll.com MX preference = 10, mail exchanger = staffmx.dotroll.com ``` Example of Linux based host query: ``` host -t MX dotroll.com dotroll.com mail is handled by 10 staffmx.dotroll.com. ``` #### MX RECORD FORMAT Priorityif multiple MX records are specified for the domain then the email will be sent to the priority with a lower priority (server)**Fields name** | **Description** |
Name | this field contains the domain or subdomain name. |
TTL | this field contains record lifetime in seconds. This is the time until the entry is stored in the resolver. |
Priority | if multiple TXT records are specified for the domain then the email will be sent to the priority with a lower priority (server) |
Mail server exchange target | contains the mail server address (`staffmx.dotroll.com`). |