SendGrid’s domain authentication handles both SPF and DKIM with CNAME records on your domain: a return-path subdomain (em1234.yourdomain.com) that makes SPF align, and two DKIM selectors, s1 and s2. With it — automated security, the default — you add nothing to your root SPF record.
| SPF | Not needed with automated security |
| DKIM | CNAMEs s1 and s2 |
| Bounce domain | em<number>.<your domain> — SPF aligns |
| Set up in | Settings → Sender Authentication |
Is your domain set up for SendGrid?
We read your SPF record, look for SendGrid’s DKIM key and check DMARC. Nothing is stored.
SPF for SendGrid
With automated security on — the default — SendGrid says it “handles the signing of your DKIM and the authentication of your SPF with CNAME records”. The bounce address is em<number>.yourdomain.com, a CNAME to SendGrid, so SPF passes for a subdomain of yours and aligns under DMARC’s relaxed default. Nothing goes in your root SPF record.
Only with automated security switched off do you publish v=spf1 include:sendgrid.net ~all yourself, on the return-path subdomain SendGrid names.
DKIM for SendGrid
In SendGrid, go to Settings → Sender Authentication → Authenticate Your Domain and publish the records it gives you. SendGrid signs with one of the two selectors at a time, which lets it rotate keys without you touching DNS.
Before you authenticate, mail is signed by SendGrid’s own domain and shows “via sendgrid.net” in Gmail.
| Name | Type | Value |
|---|---|---|
em<number> | CNAME | u<id>.wl<id>.sendgrid.net |
s1._domainkey | CNAME | s1.domainkey.u<id>.wl<id>.sendgrid.net |
s2._domainkey | CNAME | s2.domainkey.u<id>.wl<id>.sendgrid.net |
The exact values come from SendGrid; copy them from there. Placeholders are in angle brackets.
Bounce domain and DMARC
With domain authentication done, SendGrid mail passes DMARC on both SPF (the em subdomain) and DKIM (s1/s2). SendGrid’s setup also offers a starter record, v=DMARC1; p=none; — publish it only if you have no DMARC record already.
No DMARC record yet? Start with one that only reports, read the reports for a couple of weeks, then tighten it: build it with the DMARC generator.
Common mistakes
- DNS hosts that append your domain, turning em1234.yourdomain.com into em1234.yourdomain.com.yourdomain.com. Enter only the host part.
- Adding include:sendgrid.net to the root SPF record out of habit: with automated security it authorises nothing and costs lookups.
- Publishing SendGrid’s starter DMARC record next to an existing one — a domain may have only one.
Questions
Why does Gmail show “via sendgrid.net”?
The domain is not authenticated yet, so SendGrid signs with its own domain. It disappears once the s1 and s2 CNAMEs verify.
Sources
Checked against SendGrid’s own documentation on 25 September 2026:
- Configure domain authentication — twilio.com
- Verify message integrity with DKIM — twilio.com