Setting Up DKIM, SPF, and DMARC Records
These DNS records are critical for email deliverability — without them, your outgoing email is likely to be flagged as spam.
SPF (Sender Policy Framework)
Tells receiving servers which hosts are allowed to send email for your domain.
Add SPF TXT Record
Name: @ (or your bare domain)
Type: TXT
Value: "v=spf1 a mx include:your-server-hostname ~all"
If you also send via Gmail, Mailchimp, etc., add their includes:
"v=spf1 a mx include:your-server ~all"
DKIM (DomainKeys Identified Mail)
Digitally signs outgoing email to prove it wasn't tampered with.
DirectAdmin generates DKIM keys automatically:
- Log in to DirectAdmin → Email Manager → DKIM (or check DNS Management).
- You'll see a TXT record like
mail._domainkey— this should already be set. - Verify with: mxtoolbox.com/dkim
DMARC (Domain-based Message Authentication)
Tells receiving servers what to do if SPF/DKIM checks fail.
Add DMARC TXT Record
Name: _dmarc
Type: TXT
Value: "v=DMARC1; p=none; rua=mailto:postmaster@yourdomain.com; ruf=mailto:postmaster@yourdomain.com"
Policy options:
p=none— monitor only (start here)p=quarantine— send failures to spamp=reject— reject failures outright (use after monitoring)
Testing Your Configuration
- mail-tester.com — send an email and get a deliverability score
- mxtoolbox.com — check individual DNS records
- Google Postmaster Tools — monitor deliverability to Gmail