Demystifying DNS Records for Email: MX, A, CNAME, and TXT
When sending an email, your browser or mail client doesn't connect directly to an email address like user@company.com. Instead, it relies on the Domain Name System (DNS) to locate the exact mail server handling incoming messages for company.com.
In this tutorial, goodboycoder breaks down the DNS records required for reliable email routing.
1. MX (Mail Exchange) Records
MX records specify the mail servers responsible for accepting incoming email messages on behalf of a domain.
Key Features of MX Records:
- Priority: A numeric value assigned to each server. Lower numbers indicate higher priority (e.g. Priority
10is tried before Priority20). - Failover Routing: If the primary MX server is unreachable, backup mail servers queue incoming messages until the primary comes back online.
Query your domain's live MX records using our free MX Lookup tool.
2. A and AAAA Records
While MX records point to a domain name (like mail.company.com), an A record maps that domain name directly to an IPv4 address (e.g. 192.0.2.25), and a AAAA record maps it to an IPv6 address.
3. TXT (Text) Records
TXT records allow domain administrators to store arbitrary text strings in DNS. For email operations, TXT records are used for:
- SPF Verification: Storing authorized sender IP addresses (use SPF Checker).
- DKIM Public Keys: Storing cryptographic keys for signature verification (use DKIM Checker).
- DMARC Policies: Instructing receivers on handling authentication failures (use DMARC Checker).
4. Domain & SSL Security Verification
Always ensure your domain's WHOIS data and SSL certificates are active:
- Verify WHOIS registration data using WHOIS Lookup.
- Test SSL certificate validity using SSL Checker.
- Check TLS server capabilities using TLS Checker.