Prompt
How do I set up SPF DKIM and DMARC for a new email provider?
Latest observation
Here’s the practical way to set up SPF, DKIM, and DMARC when moving to a new email provider.
1) Collect what your provider gives you
Your email provider should give you:
- SPF include/domain value
- DKIM selector(s) and public key(s) or DNS records
- Sometimes a DMARC suggestion or required bounce/return-path settings
If they don’t, check their help docs for:
- “Authenticate your domain”
- “Set up DNS records”
- “SPF / DKIM / DMARC”
2) Set up SPF
SPF is a DNS TXT record that says which servers may send mail for your domain.
Example
If your provider says to authorize mailprovider.com, your SPF record might look like:
v=spf1 include:mailprovider.com -all
Important notes
- You should have only one SPF TXT record per domain.
- If you already use other senders, combine them into one record.
Example with multiple senders:
v=spf1 include:mailprovider.com include:_spf.google.com ip4:203.0.113.10 -all
Common pitfalls
- Having multiple SPF records
- Exceeding the 10 DNS lookup limit
- Forgetting to include all legitimate senders
3) Set up DKIM
DKIM signs outgoing messages so recipients can verify they weren’t altered and that they came from your domain.
What you add in DNS
Usually a TXT record like:
- Host/name:
selector1._domainkey.yourdomain.com - Value: a long public key starting with something like:
v=DKIM1; k=rsa; p=...
Your provider may give you:
- One selector
- Multiple selectors
- A CNAME instead of TXT, depending on their setup
Important notes
- Use the exact selector name your provider gives you.
- DKIM should align with your sending domain if possible.
- After publishing, your provider usually has a “Verify” button.
4) Set up DMARC
DMARC tells receiving servers how to handle mail that fails SPF and/or DKIM, and gives you reporting.
Start with monitoring
A safe first DMARC record is:
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com
This means:
- p=none: don’t reject or quarantine yet
- rua=mailto: send aggregate reports to that address
Later, enforce policy
After you confirm legitimate mail is passing SPF/DKIM alignment, you can move to:
p=quarantine- then
p=reject
Example:
v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com; pct=25
Then eventually:
v=DMARC1; p=reject; rua=mailto:dmarc@yourdomain.com
Optional useful tags
aspf=soraspf=rfor SPF alignment strict/relaxedadkim=soradkim=rfor DKIM alignment strict/relaxedpct=50to apply policy to only some mail during rollout
5) DNS record examples
These are examples only; your provider will give you exact values.
SPF
@ TXT "v=spf1 include:mailprovider.com -all"
DKIM
selector1._domainkey TXT "v=DKIM1; k=rsa; p=PUBLICKEYHERE"
DMARC
_dmarc TXT "v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com"
6) Verify everything
After DNS changes:
- Wait for DNS propagation
- Use your provider’s authentication check
- Send test emails to Gmail, Outlook, Yahoo
- Check the message headers for:
SPF=passDKIM=passDMARC=pass
You can also use tools like:
- MXToolbox
- dmarcian
- Google Postmaster Tools
- Microsoft SNDS
7) Rollout recommended order
Best practice is:
- Publish SPF
- Publish DKIM
- Set DMARC p=none
- Confirm legitimate mail passes
- Move DMARC to quarantine
- Then move to reject
8) Common mistakes to avoid
- Multiple SPF records
- Missing an old sender still using the domain
- DKIM not matching the From domain
- Turning on
p=rejecttoo early - Forgetting subdomains if they send mail
- Not monitoring DMARC reports
If you want, I can help you build the exact DNS records
If you tell me:
- your domain registrar/DNS host
- your email provider
- whether you send mail from any other services
I can draft the exact SPF, DKIM, and DMARC records for you.