The DNS records
SendGrid generates the numbers for your account. The values below use the placeholders from SendGrid's own docs.
DKIM selector s1 (automated security on)
Type: CNAME · Host: s1._domainkey
s1.domainkey.u00000000.wl000.sendgrid.net
DKIM selector s2 (automated security on)
Type: CNAME · Host: s2._domainkey
s2.domainkey.u00000000.wl000.sendgrid.net
Return path (automated security on)
Type: CNAME · Host: em0000
u00000000.wl000.sendgrid.net
This record handles bounces and SPF; it isn't part of DKIM, but SendGrid checks it in the same step.
DKIM key with automated security off
Type: TXT · Host: m1._domainkey
k=rsa; t=s; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQ…
In this mode SendGrid also gives an MX and an SPF TXT record on em<number>, and you update the TXT records yourself when your setup changes.
Set it up and turn on signing
- In SendGrid, go to Settings > Sender Authentication and click Get Started under Domain Authentication.
- Choose your DNS host, say whether to brand links, and enter the domain you send from under Domain You Send From.
- Under Advanced Settings, leave Use automated security on unless you need TXT records. Tick Use a custom DKIM selector if another service at your domain already uses the
s1/s2names. - Click Next to see the Install DNS Records page, add the records at your DNS host, then click Verify. SendGrid says DNS changes can take up to 48 hours.
- For a GoDaddy domain with automated security on and link branding off, SendGrid can add the records for you through Domain Connect.
DMARC alignment
Until a domain is authenticated, SendGrid signs with sendgrid.net and recipients may see "via sendgrid.net". After it is, signatures use your domain. SendGrid picks the domain that matches the From address first, then your default authenticated domain, and only then sendgrid.net, so authenticate every From domain you use. The return path sits on an em subdomain of yours, which can give SPF relaxed alignment as well.
Key length and rotation
With automated security, Twilio says it uses the s1 and s2 selectors interchangeably and rotates them when necessary, with only one active at a time. It doesn't publish the key length or a schedule. With automated security off, the m1._domainkey TXT key is in your zone, so any change means editing the record yourself.
Common mistakes
- Your domain doubled. SendGrid notes that GoDaddy, Route 53 and Namecheap append the domain, so enter
s1._domainkey, nots1._domainkey.example.com. - Selector clash. If another sender already publishes
s1._domainkey, use a custom DKIM selector (three letters or numbers) instead of overwriting it. - Turning off automated security to avoid underscores. It swaps the CNAMEs for MX and TXT records, but SendGrid notes a DKIM record always contains an underscore (
m1._domainkey), so a host that rejects underscores still can't publish it. - Leftover records at the same name. An old MX or TXT at the
emhost conflicts with the CNAME.
Check your SendGrid DKIM key
The selector is filled in for you; add your domain. Free, reads public DNS only.
Frequently asked questions
What does SendGrid automated security change?
With it on, you publish CNAMEs and SendGrid manages your SPF, DKIM keys and key rotation behind them. With it off, you publish an MX record and TXT records for SPF and DKIM yourself, and must edit them when your SendGrid setup changes.
Why does Gmail show "via sendgrid.net" on my emails?
Because the From domain isn't authenticated, so SendGrid signs with sendgrid.net instead of your domain. Authenticate the domain in Sender Authentication; afterward the signature uses your domain and the note goes away.
Can I change the s1 and s2 DKIM selectors in SendGrid?
Yes. Under Advanced Settings, choose Use a custom DKIM selector and type three letters or numbers. Use it when another service at your domain already uses selectors starting with s.
Sources
- Twilio SendGrid Docs: Configure domain authentication
- Twilio SendGrid Docs: Verify message integrity with DKIM
- Twilio SendGrid Docs: Troubleshooting sender authentication
- RFC 6376: DomainKeys Identified Mail (DKIM) Signatures
- RFC 8301: Cryptographic Algorithm and Key Usage Update to DKIM
Checked against SendGrid's documentation on October 9, 2026. Providers change their setup screens; if yours differs, follow the values your admin console shows.
DKIM records for other providers
- Microsoft 365CNAME: selector1, selector2
- Google WorkspaceTXT: google
- Zoho MailTXT: you choose (e.g. zoho)
- GoDaddyCNAME: secureserver1, secureserver2
- FastmailCNAME: fm1, fm2, fm3
- Proton MailCNAME: protonmail, protonmail2, protonmail3
- Amazon SESCNAME or TXT: <token1>, <token2>, <token3> (Easy DKIM), your own (BYODKIM)
- MailgunTXT or CNAME: assigned by Mailgun (e.g. pic, krs, smtp), pdk1, pdk2 (Automatic Sender Security)
- PostmarkTXT: <timestamp>pm (e.g. 20131031155228pm)
- MailchimpCNAME: k2 and a second CNAME (Marketing), mte1, mte2 (Transactional)
- BrevoTXT or CNAME: mail (TXT), 2 CNAMEs from your account
- HubSpotCNAME: hs1-<number>, hs2-<number>
- KlaviyoCNAME: km1, km2 (marketing), kt1, kt2 (transactional), ks1, ks2 (service)
- SalesforceCNAME: you choose two (e.g. example-sf-a, example-sf-b)
- ZendeskCNAME: zendesk1, zendesk2
Compare every provider's selectors in one table · SPF record for SendGrid
Related guides
How to find a domain's DKIM selector, and check its key
Find a DKIM selector from the s= tag in an email header, see the selectors Microsoft 365, Google Workspace and common senders use, then check the key.
8 min read SPF, DKIM & DMARCHow to rotate DKIM keys without breaking email
How often to rotate DKIM keys, which key length to use, how to name selectors, and how to rotate in Microsoft 365, Google Workspace and on your own server.
9 min read SPF, DKIM & DMARCDKIM "body hash did not verify" and other DKIM failures: causes and fixes
Fix DKIM failures: body hash did not verify, signature did not verify, no key for signature and short keys. Causes from mailing lists to broken TXT records.
9 min readLast updated