How to set up SPF, DKIM and DMARC for SendGrid
Updated 10 November 2026 · 5 min read
Short answer
In SendGrid go to Settings → Sender Authentication → Domain Authentication → Get Started, pick your DNS host, and publish the records it shows. With automated security on (the default) that is three CNAMEs: a branded return-path host like em1234.yourdomain.com and DKIM selectors s1._domainkey and s2._domainkey, plus a DMARC TXT at _dmarc. SendGrid then manages the SPF and DKIM values for you, so you do not add a SendGrid include to your root SPF record.
Automated security on vs off
| Setting | Records you publish | Who maintains SPF/DKIM |
|---|---|---|
| On (default) | 3 CNAMEs (em####, s1._domainkey, s2._domainkey) + DMARC TXT | Twilio SendGrid; e.g. adding a dedicated IP updates SPF automatically |
| Off | 1 MX, TXT for SPF, TXT DKIM at m1._domainkey, DMARC TXT | You; every IP change means editing SPF |
SendGrid's documentation says to turn automated security off only when your DNS provider does not accept underscores in CNAME records. Almost every modern DNS host does, so leave it on.
How the CNAME setup passes DMARC
The em#### CNAME becomes your Return-Path host, so SPF is checked on a subdomain of your domain and aligns under relaxed alignment. The s1/s2 CNAMEs point at keys SendGrid hosts, so DKIM signs with d=yourdomain.com. Both align with a From address on your domain, which is exactly what DMARC needs. That is also why your root SPF record does not need include:sendgrid.net for this setup.
Step by step
- 1
Start domain authentication
Settings → Sender Authentication → Domain Authentication → Get Started. Choose your DNS host and whether to brand links (optional, can be added later).
- 2
Copy the records
On Install DNS Records choose Manual Setup (Automatic Setup exists for GoDaddy only) and copy each host and value.
- 3
Publish them
At Cloudflare set the CNAMEs to DNS-only. At hosts that append your domain, enter just
em1234,s1._domainkeyands2._domainkey. - 4
Verify
Click Verify. SendGrid notes DNS can take up to 48 hours; a failed check usually means a typo or a doubled domain in the host.
- 5
Publish DMARC
Add
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.comat_dmarcif you do not already have one. Keep one DMARC record per domain.
Common SendGrid problems
- Sending from a domain you did not authenticate. If the From is
news.acme.combut you authenticatedacme.com, check the subdomain setting in the wizard. - Proxied CNAMEs on Cloudflare return Cloudflare addresses instead of the CNAME target, so verification fails.
- A second DMARC record added by the wizard next to your existing one. Merge them; see multiple DMARC records.
Check the result
After verification, the check should show DMARC present; for DKIM type s1 into the selector box. Run the domain through the free ReplyDak deliverability check: it reads MX, SPF, DKIM and DMARC live from public DNS, counts SPF lookups and checks the main blocklists, with no sign-up. If your DKIM selector is not a common one, type it into the optional selector box.
More setups and errors: SPF, DKIM and DMARC by provider, DNS host and error.
FAQ
Do I need include:sendgrid.net in my SPF record?
Not with automated security on. SPF is evaluated on the em#### return-path subdomain that SendGrid manages through the CNAME.
What are s1._domainkey and s2._domainkey?
SendGrid's two DKIM selectors, published as CNAMEs to keys SendGrid hosts and can rotate.
Why won't SendGrid verify my domain?
Check that the host was not doubled (em1234.acme.com.acme.com), that Cloudflare records are DNS-only, and allow time for DNS to update.