eSMS AfricaeSMS Africa
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

RecordPurpose
SPFTells receivers which servers can send email for your domain
DKIMAdds a cryptographic signature proving the email is authentic
DMARCTells 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 ~all

Already using Google Workspace?

v=spf1 include:_spf.google.com include:send.esmsafrica.io ~all

Already using Microsoft 365?

v=spf1 include:spf.protection.outlook.com include:send.esmsafrica.io ~all

Already using Zoho?

v=spf1 include:zoho.com include:send.esmsafrica.io ~all

Only 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_KEY

The 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.io

After confirming SPF and DKIM pass consistently, upgrade to quarantine:

v=DMARC1; p=quarantine; rua=mailto:dmarc@send.esmsafrica.io

Verifying 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 +short

Using nslookup (Windows)

nslookup -type=TXT yourdomain.com
nslookup -type=TXT esms._domainkey.yourdomain.com
nslookup -type=TXT _dmarc.yourdomain.com

Using 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.

On this page