Suped

Why does Sendgrid require two domain keys?

Published 3 May 2025
Updated 23 Nov 2026
12 min read
Summarize with
Two DKIM domain keys for SendGrid domain authentication and key rotation.
Updated on 23 Nov 2026: We clarified SendGrid's two-key rotation model and added DNS and receiver checks for both DKIM selectors.
SendGrid asks for two domain keys, usually s1 and s2, when Automated Security is enabled. The two DKIM selectors give SendGrid separate DNS paths for managed key rotation, so you do not need to publish a new public key each time SendGrid changes its signing key.
Each selector identifies a separate public/private key pair. The public key is available through DNS, while SendGrid keeps the private key used to sign messages. The DKIM-Signature header names the selector the receiver must query. Neither DNS record contains a private key, and these records are separate from the API key your application uses to send mail.
A single DKIM selector can authenticate mail, but it makes provider-managed rotation harder. Two selectors let SendGrid change key material without requiring a coordinated DNS replacement at the moment signing changes.

Why SendGrid requires two DKIM keys

Why SendGrid asks for s1 and s2
sendgrid.com logoWith Automated Security on, SendGrid uses two DKIM selectors so it can manage key rotation through CNAME records. Separate selector paths let SendGrid prepare another key without replacing the public key used by the active selector.
A DKIM selector is the label before ._domainkey. If SendGrid signs a message with selector s1, the receiving server looks up the public key at the s1 DKIM DNS name for your domain. If the signature names s2, the receiver looks up the second selector instead.
  1. Two selectors support DKIM key rotation without a fragile same-day DNS change.
  2. Retiring a superseded public key limits how long the matching private key remains useful for authentication.
  3. Mail signed with the prior selector can still be checked while its public key remains published.
  4. You publish stable CNAMEs once, and SendGrid manages the key material behind them.
SendGrid's domain authentication setup provides CNAME records for the two default DKIM selectors when Automated Security is on. Those CNAMEs point into SendGrid-controlled DNS, which makes provider-managed rotation practical.

How two-selector rotation works

SendGrid's DKIM documentation says it uses s1 and s2 interchangeably, rotates them when necessary, and activates one signing selector at a time for an authenticated configuration. The sequence below is an illustrative model inferred from that design. The documentation does not specify a fixed rotation interval or a guaranteed public-key overlap period.
Simplified SendGrid DKIM key rotation between s1 and s2 selectors.
Simplified SendGrid DKIM key rotation between s1 and s2 selectors.

Phase

Signing selector

Other selector

Why it matters

Active phase
s1
s2
Mail verifies against s1 while the separate s2 path is available.
Preparation
s1
s2
SendGrid can update the key material reached through s2.
Next signing phase
s2
s1
Signing can switch after the refreshed key is available.
Following preparation
s2
s1
The separate s1 path can be prepared for a later cycle.
An illustrative rotation model, not a documented SendGrid schedule or key-retention guarantee. DNS TTLs affect when changed keys become visible.
Deleting one of the two CNAME records often creates a delayed problem rather than an immediate one. A test can pass while SendGrid signs with the selector you kept. Authentication can fail later if SendGrid starts signing with the selector you removed.

What the DNS records look like

With Automated Security on, the two DKIM records are normally CNAMEs rather than raw TXT records containing public keys. A CNAME lets SendGrid update the destination record it controls while your DNS keeps pointing at the same stable name.
Example SendGrid DKIM CNAME recordsDNS
s1._domainkey.example.com. CNAME s1.domainkey.u123456.wl.sendgrid.net. s2._domainkey.example.com. CNAME s2.domainkey.u123456.wl.sendgrid.net.
A current SendGrid domain authentication setup can also show a CNAME for the return-path and SPF configuration, plus a DMARC TXT record. Those records are not additional DKIM keys. The records at s1._domainkey and s2._domainkey are the two DKIM selector records. The return-path CNAME handles the bounce domain and its SPF authentication; it is not a third DKIM key. Keep an existing DMARC policy and reporting addresses rather than adding a second DMARC record or overwriting them with a setup example.
Your actual target hostnames will differ. Each selector must have one valid DNS answer path. Do not put two different CNAME values at the same selector name. A CNAME cannot coexist with other records at the same owner name, and competing CNAMEs are not a valid way to support two sending providers.
Do not merge the two selectors
Publish both records exactly as SendGrid provides them. If your DNS host reports a conflict, check whether it appended the zone name automatically, whether you entered the full hostname twice, or whether another record already uses that selector name.
A check with Suped's DKIM checker confirms whether each selector resolves to usable DKIM key material through its CNAME chain.

DKIM checker

Check selector records and public key configuration.

?/7tests passed

How to check both SendGrid DKIM selectors

Replace example.com with your authenticated sending domain. If you use custom selectors, substitute both names shown in SendGrid. These queries extend SendGrid's manual DNS checks to check the public key behind each CNAME.
Check both selector CNAMEs and DKIM public keysbash
dig +short CNAME s1._domainkey.example.com dig +short CNAME s2._domainkey.example.com dig +short TXT s1._domainkey.example.com dig +short TXT s2._domainkey.example.com
Compare each CNAME answer with the target in SendGrid. The TXT lookup should reach a DKIM key containing a nonempty p= value. A CNAME answer alone does not confirm that usable public key material exists at the target.
Next, send a message through the account or subuser your application uses. In the receiving mailbox's Authentication-Results header, check for dkim=pass for your signing domain and dmarc=pass. A DKIM-Signature header shows that signing was attempted; it does not prove that verification passed.

Automated security versus manual security

The s1 and s2 CNAME pair belongs to SendGrid's default Automated Security model. Turning Automated Security off changes the DNS records and who must maintain them. SendGrid's domain authentication guide lists one MX record and TXT records for SPF, DKIM, and DMARC. The DKIM TXT record normally uses m1. Publish the records generated for your configuration and update their values when SendGrid requires a change.

Setting

DKIM publication

Rotation owner

Key length note

Automated Security on
Two CNAME selector records, normally s1 and s2
SendGrid manages the keys behind its DNS targets
New domain authentications use 2048-bit RSA
Automated Security off
A DKIM TXT record, normally using the m1 selector
You publish and replace the supplied DNS values
New domain authentications use 2048-bit RSA
Older setup
Existing selector records remain in place
Reauthentication is needed for a key upgrade
A setup created before June 2021 can retain 1024-bit RSA
The exact hosts and values come from the SendGrid domain authentication screen.
Do not infer key length from the selector
The names s1 and s2 do not identify the RSA key length. SendGrid's 2048-bit migration guidance says existing configurations do not upgrade automatically. Reauthenticate an older configuration with a new unused custom selector to obtain a 2048-bit key. Verify the replacement configuration and test live mail before retiring the old authentication.

Why two selectors simplify key rotation

One DKIM selector is valid. Replacing its public key at the same DNS name requires coordination with cached answers and messages still in transit. A second selector provides a separate place to publish the replacement key before signing switches.
Single selector
  1. Changing the only key can break verification for delayed mail.
  2. Replacing key material at the same DNS name must account for cached answers, even when a CNAME delegates key management to SendGrid.
  3. An exposed private key remains useful while its matching public key is published or cached.
Two selectors
  1. Separate selectors let one key path change without replacing the other.
  2. Customer CNAMEs stay stable while provider-controlled records change.
  3. Retiring old public keys limits verification with exposed private keys.
If a DKIM private key is exposed, it can sign mail that verifies while the matching public key remains published or cached. Replacing or revoking that public key limits further verification with the exposed key.

How SendGrid signs the message

A DKIM signature includes a selector tag. That tag tells the receiving server which DNS label to query. If the message contains s=s1, the receiver checks the s1 selector. If it contains s=s2, it checks the second selector. For the example below, the receiver queries s1._domainkey.example.com, combining s= with d=. DMARC compares d= with the visible From domain: strict alignment requires an exact match, while relaxed alignment requires the same organizational domain.
Simplified DKIM-Signature headertext
DKIM-Signature: v=1; a=rsa-sha256; d=example.com; s=s1; h=from:subject:date:to:mime-version; bh=base64-body-hash; b=base64-signature-data;
One DKIM signature does not say, "try both keys." It names one selector. A message can carry multiple independent DKIM signatures, but each signature is verified through its own signing domain and selector. The second SendGrid selector is a separate lookup path, not a fallback guess by the receiver. Publishing two selectors does not add a second signature to each message or guarantee inbox placement. SendGrid's delivery guidance explains that recipient filtering still applies after a server accepts a message.
Twilio SendGrid domain authentication screen showing s1 and s2 DKIM CNAME records.
Twilio SendGrid domain authentication screen showing s1 and s2 DKIM CNAME records.
A custom selector is useful when the same domain must be authenticated on a second SendGrid account or subuser and the default s1 and s2 names already exist. SendGrid's current setup guide instructs you to enter three letters or numbers and then generates two unique selector names. Publish both generated CNAMEs exactly as shown. SendGrid documents the custom DKIM selector option for avoiding an existing DNS owner name.

How SendGrid DKIM affects DMARC alignment

Two SendGrid DKIM selectors do not weaken DMARC. DMARC does not care whether a passing signature used s1 or s2. It checks whether DKIM passes and whether the signing domain meets the domain-matching requirements for the visible From header.
  1. The selector tells the receiver where to find the DKIM public key.
  2. The d= domain in the DKIM signature is the identity that DMARC checks.
  3. Relaxed alignment accepts the same organizational domain; strict alignment requires an exact domain match.
  4. One passing DKIM signature with domain alignment is sufficient for DMARC. SPF can also provide a DMARC pass when its authenticated domain meets the matching requirement.
When SendGrid traffic fails DMARC, check for an unverified authenticated domain, a missing CNAME, a subdomain alignment problem, or mail that still signs with a provider domain. A broader domain health check helps check DKIM, SPF, and DMARC together. Publishing both DKIM records does not create a DMARC policy or enable aggregate reporting; those settings belong in your DMARC record.
DMARC record detail view showing SPF, DKIM, DMARC, rDNS diagnostics, and DNS records
suped.com logoIn Suped's DMARC reporting platform, filter reports to SendGrid traffic and compare DKIM results with domain alignment. Use DNS diagnostics to investigate missing or conflicting selector records.

Common setup mistakes

Check each SendGrid DKIM hostname separately when troubleshooting. The dashboard can verify one selector while the other remains pending, so a single successful check does not confirm that both records are correct.

Symptom

Likely cause

Fix

One selector verifies
Only one CNAME exists or resolves correctly.
Compare both records with the SendGrid setup screen.
Both remain pending
The DNS host appended the domain twice, or the changes are still propagating.
Check the authoritative DNS answer and correct the owner names. Cached answers can take time to expire; SendGrid advises allowing up to 48 hours for verification.
DKIM passes but DMARC fails
No passing DKIM signature has domain alignment, and SPF does not provide it either.
Compare d= with the From domain and check SPF domain alignment.
CNAME is rejected
Another record already exists at that selector name.
Resolve the conflict or create the authentication with a custom selector.
Compact troubleshooting guide for SendGrid DKIM selectors.
If multiple sending tools authenticate the same domain, avoid reusing selector names. Give each provider its own selectors where supported, or use a sending subdomain to keep DNS ownership clear. The related guidance on multiple DKIM selectors explains the naming pattern in more detail.
Resolve selector CNAME conflicts
One selector name can point to one CNAME target. If two sending configurations both ask for s1, do not stack both values. Use a custom selector where supported, or authenticate a separate sending subdomain.

What to verify before sending volume

Before a SendGrid domain sends meaningful volume, verify that both selectors resolve, live mail signs with the expected domain, and DMARC reports show DKIM passing with domain alignment for SendGrid traffic. A received message confirms what SendGrid is signing now; dashboard verification alone does not establish a DMARC pass.
  1. Create both SendGrid DKIM CNAMEs exactly as shown in the setup screen.
  2. Verify that each selector resolves through the expected CNAME chain.
  3. Send a real message, inspect d= and s= in the DKIM-Signature header, and confirm the receiver reports dkim=pass.
  4. Confirm that SendGrid traffic passes DKIM with alignment before tightening DMARC policy.

Email tester

Send a real email to this address. Suped shows a results button when the test is ready.

?/43tests passed
For ongoing checks, Suped's DMARC monitoring helps identify when SendGrid traffic loses alignment, an expected source stops authenticating, or a new source begins using the domain. This is useful when several teams or vendors send mail for the same domain.

Keep both SendGrid DKIM records published

Publish both records, do not combine them, and do not delete the selector that appears unused. If DMARC fails after setup, inspect the signing domain and live message headers instead of treating the second selector as the cause.

Frequency asked questions

SendGrid documents one active signing selector at a time for an authenticated configuration. The other selector supports rotation. A message can contain independent DKIM signatures, but a receiver does not try s1 and s2 as fallback keys for the same signature.

No. Authentication can work while SendGrid signs with s1, then fail if signing moves to s2. Publish both CNAME records exactly as provided.

The documented purpose is managed DKIM key rotation. The two-selector design gives SendGrid separate key lookup paths, but it does not make a receiver retry a failed signature against the other selector.

No. DMARC checks whether a passing authentication result has domain alignment with the visible From domain. The DKIM selector identifies the public key lookup; changing s1 to s2 does not change the signing domain.

Do not add two CNAME targets to one selector. Use a custom selector if the sending configuration supports it, or authenticate a separate sending subdomain.

With Automated Security off, SendGrid normally supplies a DKIM TXT record using m1 instead of the s1 and s2 CNAME pair. The current setup guide also lists an MX record and TXT records for SPF and DMARC. Publish the generated records and maintain later changes yourself.
DMARC monitoring

Start monitoring your DMARC reports today

Suped DMARC platform dashboard
What you'll get with Suped
Real-time DMARC report monitoring and analysis
Automated alerts for authentication failures
Clear recommendations to improve email deliverability
Protection against phishing and domain spoofing