Quick answer: The DNS record that identifies an email server is the Mail Exchange (MX) record. It tells sending mail servers which hostname accepts inbound messages for a domain and specifies the delivery order using priority values.
Example zone entry:
example.com. 3600 IN MX 10 mail.example.com.
If you are exploring DNS record types across the broader Domain Name System, MX is the dedicated record built specifically for email routing.
Why MX and Not A, AAAA, CNAME or PTR?
Certification exams and technical quizzes frequently ask searchers to pick which DNS record designates an email server from a multiple-choice list. While several records interact with email infrastructure, only the MX record specifies the inbound mail recipient for a domain.
| Record Type | Core Function | Identifies the Inbound Email Server? |
|---|---|---|
| MX | Names the receiving mail exchange hosts and sets their delivery order | Yes |
| A | Resolves a hostname to an IPv4 address (the mail server host uses this) | No |
| AAAA | Resolves a hostname to an IPv6 address | No |
| CNAME | Creates an alias pointing one hostname to another canonical name | No |
| PTR | Resolves an IP address back to a hostname (reverse DNS) | No |
| TXT | Stores text attributes, including sender policies (SPF, DKIM, DMARC) | No |
PTR is the most common wrong answer on technical assessments because it is heavily used during email delivery. Receiving mail servers query PTR records to verify the identity of a sending server, but inbound senders never use PTR records to discover where to deliver new messages.
An MX record must point directly to a hostname backed by an A record or an AAAA record. Pointing an MX record to a CNAME record violates RFC 2181 guidelines and leads to mail delivery failures. Similarly, general policy records are published under a TXT record, but they govern sender legitimacy rather than host identification.
How MX Records Route Email
When someone sends an email to [email protected], the sender’s mail transfer agent (MTA) follows a sequential lookup path through the Domain Name System to complete delivery:
- The sending MTA extracts the recipient domain (example.com).
- The sending server queries a recursive DNS server for the domain’s MX records.
- The nameserver returns the list of designated mail exchangers with their assigned priority ratings.
- The sending server selects the record with the lowest preference number.
- The sender looks up that host’s IP address (A or AAAA) and opens an SMTP connection over port 25.
RFC 1035 Standard MX Record Format
;; Name TTL Class Type Priority Mail Exchanger Host
example.com. 3600 IN MX 10 mail1.example.com.
example.com. 3600 IN MX 20 mail2.example.com.
The Role of Priority Numbers
MX records require an integer priority value (preference number). The lower the numerical value, the higher the delivery priority.
In the example above, senders attempt delivery to mail1.example.com (priority 10) first. If mail1 is unresponsive, the sender fails over to mail2.example.com (priority 20). If multiple MX records share identical priority numbers, sending servers distribute connection attempts evenly between them to balance traffic loads.
To explore advanced clustering, failover strategies, and provider setup guides, read our complete guide to DNS MX records. For broader server definitions, review our guide to types of DNS servers.
How to Find a Domain’s Email Server
You can inspect any domain’s public mail exchange servers from your terminal or command prompt using standard diagnostic tools.
Querying MX via Command Line
Using nslookup (Windows, macOS, Linux):
nslookup -type=mx example.com
Using dig (macOS, Linux):
dig MX example.com +short
You can also run automated web diagnostics using our free MX record lookup tool to review priority ratings, response times, and server configurations in one view.
Because MX records are completely public, threat actors query them during initial reconnaissance to identify your email provider, identify gateway security filters, and tailor phishing campaigns against your infrastructure.
Other DNS Records Email Depends On
An MX record ensures mail arrives in your inbox, but it does not protect your domain reputation. To prevent bad actors from spoofing your brand, modern email delivery relies on a coordinated set of authentication records published in your DNS zone.
Incoming Mail Delivery: MX Record
Outgoing Mail Security: SPF + DKIM + DMARC + PTR
SPF (TXT Record)
Sender Policy Framework specifies which IP addresses, subnets, and third-party delivery vendors are authorized to send email on behalf of your domain. If receiving servers cannot verify the authenticity of the sender’s domain during inbound checks, a missing or invalid SPF record is usually the root cause.
DKIM (TXT Record)
DomainKeys Identified Mail adds an asymmetric cryptographic signature to outbound message headers. You publish the public key in your DNS zone under a unique selector hostname, allowing recipients to verify that the message content was not modified in transit. Learn how cryptographic keys safeguard messages in our overview of DKIM.
DMARC (TXT Record)
Domain-based Message Authentication, Reporting, and Conformance unifies SPF and DKIM. Published at _dmarc.example.com, your DMARC record tells recipient servers whether to accept, quarantine, or reject messages that fail authentication checks. Validate your configuration using our free DMARC checker.
PTR (Reverse DNS)
A Pointer record maps a mail server’s IP address back to its verified hostname. Major receiving providers like Google, Yahoo, and Microsoft reject or discard incoming connections from sending servers lacking matching Forward Confirmed Reverse DNS. Check your reverse mappings using our PTR lookup and test validation with our FCrDNS checker.
MTA-STS, TLS-RPT and BIMI
Advanced email programs deploy three additional protocol layers:
- MTA-STS forces strict TLS transport encryption to block man-in-the-middle downgrade attacks.
- TLS-RPT provides delivery diagnostics when mail transmission encounters transport security issues.
- BIMI renders your verified brand logo beside authenticated emails in participating subscribers’ inboxes.
What Is an Email Server?
An email server is a specialized software application or dedicated host that processes, sends, receives, and stores electronic messages across computer networks. Mail servers operate on standardized network protocols to route messages between senders and recipients, working in tandem with encryption tools to encrypt emails across public routes.
Types of Email Servers
Mail infrastructure divides responsibilities between protocols handling message transport and those handling client mailbox synchronization.
| Server Type | Primary Role | Standard Ports |
|---|---|---|
| SMTP (Simple Mail Transfer Protocol) | Pushes messages outbound and relays them between mail transfer agents. | 25 (relay), 587 (submission) |
| IMAP (Internet Message Access Protocol) | Syncs mail folders bidirectionally across multiple devices and webmail. | 993 (SSL/TLS) |
| POP3 (Post Office Protocol 3) | Downloads messages to a single local device and removes them from the server. | 995 (SSL/TLS) |
SMTP moves mail across the internet using destination MX records, while IMAP and POP3 allow end users to access delivered messages inside their mail clients.
Frequently Asked Questions
Does SMTP use MX records?
Yes. When an SMTP server processes an outbound message, it extracts the recipient domain and performs an MX lookup against DNS. It connects to the host identified in the MX record over port 25 to hand off the message.
What DNS records do I need for email?
To send and receive email securely, you need an MX record to route inbound mail, an A record pointing to your mail server IP, and SPF, DKIM, and DMARC TXT records to authenticate outgoing messages and prevent spoofing.
What happens if a domain has no MX record?
Under RFC 5321 rules, if a domain publishes no MX record, sending mail transfer agents attempt a fallback delivery to the domain’s root address record (A or AAAA). If no address record exists, the message bounces.
Can an MX record point to an IP address or a CNAME?
No. Internet standards require MX records to point directly to a canonical domain name (hostname) that resolves to an address record. Pointing an MX record directly to an IP address or a CNAME alias causes mail routing failures.
How many MX records should a domain have?
A domain should have at least two MX records pointing to separate mail servers on diverse networks. Publishing primary and secondary records with different priority ratings ensures continuous email delivery if one server experiences downtime. Learn more in our guide to DNS MX records.
Final Thoughts
The Mail Exchange (MX) record is the only DNS record that identifies an email server for receiving inbound messages. While address records connect hostnames to network hardware, and security records like SPF, DKIM, and DMARC prevent identity impersonation, the MX record controls where email gets routed.
Maintaining accurate MX records combined with strict cryptographic email authentication ensures your business communications remain reliable, reachable, and secure against cyber attacks.