What is MX record?

MX records are mail exchange records. It is used in determining the priority of email servers for a domain. A mail exchange record is an entry in your DNS zone file which specifies a mail server to handle a domain’s email. You must configure an MX record to receive the email for your domain. The lowest priority email server is the first destination for email. If the lowest priority email server is unavailable, mail will be sent to the highest priority email servers. We can check MX entry of a domain in either Linux Terminal or through Windows Command Prompt.

Command to check MX entry using Linux terminal:

In Linux, the ‘dig’ command is a useful DNS lookup utility. It is used to retrieve DNS record information of any domain name. This tool is useful for troubleshooting any admin configuring or existing DNS server. The below command is used to check MX entry for a domain

dig yourdomainname.com MX