Guides
SPF, DKIM & DMARC
Configure email authentication DNS records for best deliverability.
Email authentication records (SPF, DKIM, DMARC) are essential for inbox delivery. Without them, your emails are more likely to land in spam.
What each record does
| Record | Purpose |
|---|---|
| SPF | Tells receivers which servers can send email for your domain |
| DKIM | Adds a cryptographic signature proving the email is authentic |
| DMARC | Tells receivers what to do when SPF/DKIM fail |
SPF setup
Add a TXT record:
Host: @ (or yourdomain.com)
Value: v=spf1 include:send.esmsafrica.io ~allAlready using Google Workspace?
v=spf1 include:_spf.google.com include:send.esmsafrica.io ~allAlready using Microsoft 365?
v=spf1 include:spf.protection.outlook.com include:send.esmsafrica.io ~allAlready using Zoho?
v=spf1 include:zoho.com include:send.esmsafrica.io ~allOnly ONE SPF record per domain. Merge all includes into a single record.
DKIM setup
Add the TXT record provided by eSMS Mail:
Host: esms._domainkey.yourdomain.com
Value: v=DKIM1; k=rsa; p=YOUR_PUBLIC_KEYThe exact value is shown in your domain's DNS records page.
DMARC setup
Start with monitoring mode:
Host: _dmarc.yourdomain.com
Value: v=DMARC1; p=none; rua=mailto:dmarc@send.esmsafrica.ioAfter confirming SPF and DKIM pass consistently, upgrade to quarantine:
v=DMARC1; p=quarantine; rua=mailto:dmarc@send.esmsafrica.ioVerifying your records
Using dig (Linux/Mac)
# Check SPF
dig TXT yourdomain.com +short
# Check DKIM
dig TXT esms._domainkey.yourdomain.com +short
# Check DMARC
dig TXT _dmarc.yourdomain.com +shortUsing nslookup (Windows)
nslookup -type=TXT yourdomain.com
nslookup -type=TXT esms._domainkey.yourdomain.com
nslookup -type=TXT _dmarc.yourdomain.comUsing eSMS Mail diagnostics
curl https://send.esmsafrica.io/v1/domains/{domain_id}/diagnose \
-H "Authorization: Bearer esms_k_your_api_key"This returns actionable issues and fix suggestions.