mx.target.invalid_hostname
MX Target Is Not a Valid Hostname
What we check
We validate each MX target against RFC 1123 hostname syntax. MX RDATA must be a hostname (RFC 5321 §5.1) — names with underscores, trailing dots in unexpected positions, embedded spaces, or other characters that violate the hostname grammar are flagged.
What this finding means
An MX record contains a target that is not a syntactically valid hostname. This is distinct from a hostname that simply does not resolve (mx.target_unresolvable) — this target cannot even be parsed as a hostname. Common causes: an underscore in the name (valid in DNS but not in hostnames), a bare IP without bracket notation, or a copy-paste error.
Why it matters
- Unpredictable behavior. Some DNS resolvers and mail servers tolerate invalid hostnames; others reject them. The result depends on the sender's implementation.
- Cannot be relied upon for delivery. Even if a resolver returns an address for an invalid hostname, the MX record is technically malformed and should not be trusted.
- Easy to fix. Invalid hostnames are almost always typos or configuration errors with a straightforward correction.
How to fix
Identify the invalid character or syntax in the MX target:
dig +short MX example.com # Look for underscores, spaces, or other non-hostname charactersCorrect the hostname to comply with RFC 1123 (letters, digits, hyphens only; no underscores):
; Before (invalid — underscore) example.com. IN MX 10 mail_server.example.com. ; After (valid) example.com. IN MX 10 mail-server.example.com.
How it's graded
An invalid MX hostname is an informational finding with no grading penalty. The target may still work in practice, but the configuration is technically malformed. See Grading Methodology for the full scoring model.
Evidence example
$ dig +short MX example.com
10 mail_server.example.com.
MX target "mail_server.example.com" contains an underscore — not valid hostname syntax (RFC 1123)