MX Records: How Email Routing Actually Works
Every time you send an email to someone@example.com, your mail server looks up the MX records for example.com in DNS to find out which server is responsible for receiving mail at that domain. If those records are wrong, missing, or pointing at a misconfigured server, the email doesn't arrive. It really is that mechanical.
What an MX Record Contains
An MX record has two parts: a priority value and a hostname. The hostname is the mail server that accepts mail for the domain. The priority is a number — lower numbers are tried first. A domain can have multiple MX records with different priorities, providing redundancy: if the primary mail server is unreachable, the sending server tries the next one in priority order.
Example: example.com might have 'MX 10 mail1.example.com' and 'MX 20 mail2.example.com'. Sending servers try mail1 first. If that's down, they try mail2. If both are unreachable, they queue the message and retry for up to 5 days before bouncing it.
The SPF, DKIM, DMARC Triangle
MX records handle inbound delivery. Outbound delivery — making sure your emails are trusted by other servers — requires three additional DNS records. SPF (Sender Policy Framework) is a TXT record listing which IP addresses are authorised to send mail from your domain. DKIM (DomainKeys Identified Mail) adds a cryptographic signature to outgoing emails, verified using a public key published in DNS. DMARC ties them together and tells receiving servers what to do when SPF or DKIM checks fail.
Actually, scratch that — the proper way to think about this is that SPF and DKIM are the authentication signals, and DMARC is the policy layer. Without DMARC, passing SPF or DKIM individually doesn't guarantee much. With a strict DMARC policy (p=reject), unauthenticated emails claiming to be from your domain are rejected rather than delivered to spam.
Why Email Setup Goes Wrong
The most common email delivery failures come from MX records pointing at the right hostname but the hostname not resolving correctly, or MX records pointing at an IP address directly (wrong — they must point at hostnames). New domain setups frequently have missing SPF records, which causes email to fail spam checks at major providers like Gmail and Outlook.
Look Up MX and DNS Records for Any Domain
Check MX records, nameservers, and registration details for any domain.
WHOIS Lookup