Query MX Records
Last updated
You can use dig to determine the MX records associated with a domain name. For more detailed instructions on using dig, see How to Use dig. For a quick reference of dig syntax and options, see the dig Reference Guide.
MX records specify the mail servers responsible for receiving email on behalf of the domain.
To list a domain’s MX records, run:
dig example.com MX +noall +answer
The result looks like this:
example.com. 3600 IN MX 10 mx1.example.net.
example.com. 3600 IN MX 20 mx2.example.net.
Each line in the ANSWER section includes:
- The fully-qualified domain name (FQDN)
- The remaining time-to-live (TTL)
- The priority (lower values are tried first)
- The mail server hostname
To check the records on DNSimple’s name servers directly, before any caching, add @ns1.dnsimple-edge.com to the command. To change your MX records, see Set Up MX Records for Email Hosting.
Have more questions?
If you have additional questions or need any assistance with MX records, just contact support, and we will be happy to help. You can also read more about DNS hosting at DNSimple.