Prompt
spf dkim dmarc for sendgrid
Latest observation
Oct 12, 2026
OpenAI APIWeb search: off
Here’s the basic setup for SPF, DKIM, and DMARC with SendGrid.
1) SPF
If you send mail through SendGrid, add SendGrid to your domain’s SPF record.
Typical SPF record
If you already have no SPF record:
v=spf1 include:sendgrid.net ~all
If you already use other senders, merge them into one SPF record, for example:
v=spf1 include:sendgrid.net include:_spf.google.com ~all
Important
- You should have only one SPF TXT record per domain.
- Multiple SPF records can cause failures.
2) DKIM
For SendGrid, DKIM is usually set up by adding CNAME records provided by SendGrid.
Typical process
- In SendGrid, go to: Settings → Sender Authentication
- Choose Domain Authentication
- Enter your domain
- SendGrid will give you DNS records, usually:
- 2 CNAME records for DKIM
- sometimes an additional CNAME for link branding
Example
You’ll see something like:
s1._domainkey.yourdomain.com CNAME s1.domainkey.u123456.wl.sendgrid.net
s2._domainkey.yourdomain.com CNAME s2.domainkey.u123456.wl.sendgrid.net
Use the exact values from SendGrid.
3) DMARC
DMARC is a policy record you publish in DNS.
Basic starter record
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com
More restrictive examples
Monitor only:
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com
Quarantine failing mail:
v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com
Reject failing mail:
v=DMARC1; p=reject; rua=mailto:dmarc@yourdomain.com
DNS name
DMARC record goes on:
_dmarc.yourdomain.com
Recommended setup order
- Set up SendGrid domain authentication
- Publish SPF
- Publish DKIM CNAMEs
- Add DMARC
- Test with a message and check headers
Example final DNS layout
@ TXT "v=spf1 include:sendgrid.net ~all"
_dmarc TXT "v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com"
s1._domainkey CNAME s1.domainkey.u123456.wl.sendgrid.net
s2._domainkey CNAME s2.domainkey.u123456.wl.sendgrid.net
Notes
- SPF checks the sending server
- DKIM signs the message
- DMARC tells receivers what to do if SPF/DKIM fail
If you want, I can also give you:
- a DNS record template for Cloudflare/Route 53/GoDaddy, or
- help you build the exact records for your domain + SendGrid account.