MX record
also: Mail eXchange record
A DNS record that specifies the mail server responsible for receiving email messages for a domain.
An MX (Mail eXchange) record is a type of DNS resource record that tells other mail servers where to send email addressed to a particular domain. When someone sends an email to user@example.com, the sender's mail server queries DNS for the MX record of example.com to find the address of the mail server that should receive that message.
MX records include a priority value (preference number) that determines the order in which mail servers should be tried. A lower number means higher priority. For example, a domain might have multiple MX records: one with priority 10 pointing to mail1.example.com and another with priority 20 pointing to mail2.example.com, ensuring mail is delivered to the backup server if the primary is unavailable.
You can view MX records for a domain using command-line tools like dig, nslookup, or host. For instance: dig example.com MX will display all MX records configured for that domain.