How to fix: MX Hostname Is a CNAME (RFC Violation)
An MX record points to a hostname that is a CNAME alias rather than an A/AAAA record. RFC 5321 explicitly prohibits MX targets from being CNAME records.
Why it matters
Mail servers that strictly follow RFC 5321 will reject or skip this MX record, causing mail delivery failures for a subset of senders.
RFC 5321 §5.1 requires that MX target hostnames resolve to A or AAAA records directly, not via CNAME. Many mail servers follow the RFC strictly and will not follow CNAMEs for MX targets, treating them as invalid.
How to fix it
- 1Point the MX record directly at a hostname with an A/AAAA record.
- 2If the MX hostname is managed by a provider, use the canonical hostname they provide, not a CNAME alias.
Code examples
Correct MX: no CNAME
# Correct: MX points to a hostname with A record
example.com. IN MX 10 mail.example.com.
mail.example.com. IN A 198.51.100.10
# Incorrect: MX points to a CNAME
# example.com. IN MX 10 alias.example.com.
# alias.example.com. IN CNAME mail.example.com. <- RFC violationReferences
Detected automatically by VulnRadar. The check id is email-mx-hostname-cname, stable across every scan so you can filter or diff on it.
More email checks
- LowDMARC Forensic Report URI (ruf=) Missing
- MediumDMARC Aggregate Report URI (rua=) Missing
- MediumMTA-STS (SMTP Strict Transport Security)
- LowTLS-RPT Record Missing rua= Reporting URI
- HighSPF Exceeds 10 DNS Lookup Limit
- HighSPF Redirect Loop
- LowDMARC pct= Below 100
- MediumDMARC Policy Set to Monitor-Only (p=none)
Questions
- How severe is MX Hostname Is a CNAME (RFC Violation)?
- VulnRadar rates this medium severity in the email category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id email-mx-hostname-cname, which stays the same between runs so you can filter, diff, or gate CI on it.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.