How to Configure DNS Records for Email: MX, DKIM, DMARC, SPF, and SRV Setup Guide
Email DNS Records Setup Guide
DNS records are essential for proper email functionality. Here's how to set up MX, DKIM, DMARC, SPF, and SRV records for your domain.
Adding MX Records
MX records direct email traffic to the correct servers. You have two options:
- Use Pre-Set Records (Recommended)
- Available for: Google Workspace, Microsoft 365, Fastmail, Proton Mail, Neo, Titan, iCloud, and Zoho Mail
- Navigate to DNS Settings and select your provider from pre-sets
- Add Custom MX Records
- Go to DNS Settings > Custom Records
- Click Add Record
- Select MX as Type
- Enter "@" in Host field
- Add Priority (0-255)
- Input mail server URL in Data field
- Save and repeat for additional records
DKIM and SPF Authentication
These TXT records verify email authenticity:
- DKIM Setup:
- Access DNS Settings > Custom Records
- Choose TXT/CNAME as Type
- Enter provider's host information
- Add DKIM record in Data field
- SPF Setup:
- Similar process as DKIM
- Records begin with "v=spf1"
- Merge multiple SPF records into one
Error message displayed on monitor
DMARC Configuration
Add DMARC record to prevent email spoofing:
- Select TXT as Type
- Enter "_dmarc" in Host field
- Input provider's DMARC record value
- Only one DMARC record allowed per domain
- Merge multiple records if needed
SRV Records Setup
- Gather required information:
- Service name (e.g., _smtp)
- Protocol (e.g., _tcp)
- Priority/TTL (optional)
- Weight
- Port number
- Target host
- Add SRV record:
- Enter service and protocol in Host field
- Add priority if provided
- Combine weight, port, and target in Data field
- Format: "weight port target.domain.com"
Remember to verify records with your email provider and allow 24-48 hours for changes to propagate throughout the DNS system.