Protect new mailboxesFresh mailboxes burn fast on a dirty list

Verify every lead before the first send and keep bounces low from day one.

Verify 25 emails free →
Product Bulk verificationReal-time APISignup form widget Catch-all detectionRole and disposable flagsFree email checker
Solutions Cold email agenciesSales teams and SDRsDevelopers and SaaS InstantlySmartleadApollolemlistClayHubSpotMailchimpWoodpeckerReply.ioSaleshandyZapierMaken8n All integrations
Mailboxes Google Workspace mailboxesOutlook mailboxesNew cold domain checklist
Compare vs ZeroBouncevs NeverBouncevs Emailable Pricing comparedCredit expiry comparedAll comparisons
Resources GuidesBounce rate benchmarksHow many bounces burn a domain?MX records MX lookupDomain health reportEmail list cleanerAll MX Tools
Pricing
Home / MX records / MX and CNAME

Can an MX record point to a CNAME or an IP address?

No to both, by the standards. An MX record must name a host that has its own A or AAAA records. Here is what the RFCs say, what mail servers actually do when you break the rule, and how to fix it in two minutes.

Updated 2026-11-24

You want mail.yourcompany.com to follow your provider's host name, so you make it a CNAME and point the MX at it. Or your DNS panel has a box that says "points to" and you paste in the server's IP address. Both look reasonable. Both break the mail standards, and one of them stops mail outright.

TL;DR

  • MX to a CNAME: not allowed. RFC 2181, section 10.3: the MX value "must not be an alias". RFC 5321 puts such a setup "outside the scope of this Standard".
  • What really happens: many senders follow the alias and deliver anyway. Even ietf.org's MX host was a CNAME on 24 November 2026. But you're relying on tolerance, not the standard.
  • MX to an IP address: broken. The MX field holds a host name. MX 10 192.0.2.25 is read as a name ending in "25", which doesn't exist, so mail can't be delivered.
  • The fix: point the MX at the canonical host name (the CNAME's target), or create an A/AAAA record for a mail host and point the MX at that.

What the standards say

Three documents settle it.

RFC 1035 (1987) defines the MX record's second field, EXCHANGE, as "a <domain-name> which specifies a host willing to act as a mail exchange for the owner name" (RFC 1035, section 3.3.9). A host name, not an address.

RFC 2181 (1997), the DNS clarifications, is the explicit ban: "The domain name used as the value of a NS resource record, or part of the value of a MX resource record must not be an alias. Not only is the specification clear on this point, but using an alias in either of these positions neither works as well as might be hoped, nor well fulfills the ambition that may have led to this approach." The name "must have as its value one or more address records" and "never a CNAME RR".

RFC 5321 (2008), the SMTP standard, says the same from the sender's side. The data field of an MX "MUST contain a domain name. That domain name, when queried, MUST return at least one address record (e.g., A or AAAA RR)". It continues: "Any other response, specifically including a value that will return a CNAME record when queried, lies outside the scope of this Standard."

The worry is old. Craig Partridge's original routing memo, RFC 974 (January 1986), noted that its loop-prevention check breaks when an MX points at an alias, and that this "can be avoided if aliases are never used in the data section of MX RRs" (history of the MX record).

Why the rule exists

RFC 2181 gives the practical reasons.

  • Extra lookups. When a DNS server answers an MX query it adds the A records of each MX host to the same response ("additional section processing"). That processing "does not include CNAME records, let alone the address records" behind them. So with a CNAME, the sender gets no address and must make more queries, on every delivery.
  • Lookups can fail. RFC 2181 warns that in "some particular hard cases" the missing addresses can make the request fail. A chain of two or three aliases multiplies the points of failure.
  • Loop checks and self-recognition. A mail server compares MX names with its own names to avoid sending mail to itself or in circles. An alias hides the real name and defeats the comparison (RFC 974, and RFC 5321 section 5.1 on relays).

RFC 2181's verdict on the fix: "It is trivial for the DNS administrator to avoid this by resolving the alias and placing the canonical name directly in the affected record."

Additional section processing adds the MX host’s address records to the answer but never follows a CNAME, so an alias costs extra lookups on every delivery and is outside RFC 5321.

What really happens: the IETF's own MX

In practice, plenty of mail servers resolve the alias and deliver anyway. The clearest example is the organization that writes the standards. On 24 November 2026, Cloudflare's public resolver returned:

$ dig MX ietf.org +short
0 mx.ietf.org.

$ dig mx.ietf.org
mx.ietf.org.   300  IN  CNAME  3056135155a742cca97f448d76fb141e.pacloudflare.com.
3056135155a742cca97f448d76fb141e.pacloudflare.com.  IN  A  172.65.231.214

So the MX for ietf.org (and for rfc-editor.org, which shares it) pointed at a CNAME, exactly what RFC 2181 forbids. Mail to the IETF is plainly being delivered, since its working groups run on mailing lists, so the major senders follow the alias.

That's the honest picture: an MX-to-CNAME setup usually works, but the standard explicitly doesn't promise it. A sender that refuses it is within its rights, and the failure would look like your problem, not theirs. If you control the record, there's no reason to take the risk. The extra lookups also make every delivery slightly slower and slightly more fragile.

Check whether your MX hosts are aliases with our MX lookup, which flags an MX host that resolves through a CNAME.

A CNAME on the domain itself is a different thing

Don't confuse the MX target with the domain being looked up. If shop.example.com is a CNAME, an MX lookup for it follows the alias. RFC 5321: "If a CNAME record is found, the resulting name is processed as if it were the initial name." That is allowed.

For example, www.microsoft.com was a CNAME to an Akamai host on 24 November 2026, and an MX query for it returned the CNAME chain and no MX records at the end. A sender with mail for [email protected] would therefore fall back to an implicit MX at the Akamai web host, not to Microsoft's mail servers (what happens with no MX record).

The catch: a name that is a CNAME can't have any other records. RFC 1034 says "If a CNAME RR is present at a node, no other data should be present", and RFC 2181 repeats it. So you can't put a CNAME and an MX on the same name. That's why the bare domain (example.com) can't be a CNAME if it receives mail.

SetupAllowed?What happens
example.com MX 10 mx1.provider.net, where mx1 has A/AAAA recordsYesNormal delivery
example.com MX 10 mail.example.com, where mail is a CNAMENo (RFC 2181 10.3)Often works; extra lookups; not guaranteed
shop.example.com CNAME example.com, no MX on shopYesMX lookup for shop follows the alias to example.com's MX
example.com with both a CNAME and an MXNo (RFC 1034)Invalid zone data
example.com MX 10 192.0.2.25No (RFC 1035, 5321)The "host" doesn't exist; mail fails

MX records with an IP address

This one isn't a grey area. Because the MX field is a domain name, 192.0.2.25 typed into it becomes a name with four labels, the last being "25". There is no top-level domain called "25", so the address lookup comes back "no such domain" and the sender has nowhere to connect.

It happens on live domains. On 24 November 2026, both Cloudflare's and Google's resolvers returned this record for one domain:

no-reply.com.   MX  3600 127.0.0.1.

Two mistakes in one: an IP address in the host field (and a loopback address at that), and what looks like a TTL of 3600 entered as the priority. A lookup for the host name 127.0.0.1. returned NXDOMAIN, so no standard-following sender can deliver mail there. If the aim was to refuse mail, a null MX does that properly (null MX, RFC 7505).

Some DNS panels encourage the mistake with a field labelled "points to" or "value". The fix is always the same: create an A record such as mail.example.com A 192.0.2.25 (and an AAAA record if the server has IPv6), then point the MX at mail.example.com.

The MX field holds a domain name (RFC 1035), so an IP address becomes a name ending in a label that is not a real top-level domain. Create an A record and point the MX at its name.

How to fix it

  1. Find the bad record. Run dig MX yourdomain.com +short, then dig CNAME on each host it returns, or use the MX lookup. More methods in how to check MX records.
  2. If the MX host is a CNAME, look up where the CNAME points and put that canonical host name in the MX record instead. If your provider gave you a specific MX value, use exactly that.
  3. If the MX holds an IP address, create an A (and AAAA) record for a mail host name and point the MX at the name.
  4. Keep priorities and TTL. Change only the target. If you are moving providers at the same time, follow a cutover plan (how to change MX records safely).
  5. Re-check after the old TTL has passed, and send a test message from an outside account.

If you manage DNS for clients, this is worth a sweep: a record that works today only because senders are lenient is a record you don't control. The same goes for the contact lists you send to. Addresses on domains with broken MX records bounce, and Mail Exchange catches them before you send: 25 free checks on the trial, then plans from $49 a month for 10,000 verifications and daily checks on 10 sending domains (pricing). Other record problems are in MX record mistakes and how to fix them.

Common questions

Can an MX record point to a CNAME?

Not according to the standards. RFC 2181 section 10.3 says the value of an MX record must not be an alias, and RFC 5321 says an MX target that returns a CNAME lies outside the SMTP standard. Many mail servers follow the alias anyway, but delivery isn't guaranteed, so point the MX at the canonical host name.

Can an MX record point to an IP address?

No. The MX target must be a host name that has A or AAAA records. An IP address in the MX field is treated as a host name, which doesn't exist, so senders can't deliver. Create an A record for a mail host name and point the MX at that name.

Can my domain have both a CNAME and an MX record?

Not on the same name. RFC 1034 says no other data should be present where a CNAME exists, so a name with a CNAME can't also carry MX records. A subdomain that is a CNAME uses the MX records of the name it points to.

Why does mail still work with my MX pointing to a CNAME?

Because many sending servers resolve the alias and connect to the address behind it, even though the standard doesn't require them to. It costs extra DNS lookups on every delivery, and any sender that follows the rule strictly may fail. Fixing the record removes the risk.

Start your free trial →