SendGrid uses CNAME-based domain authentication
Instead of a plain TXT record, SendGrid provides 6 CNAME records through its Sender Authentication wizard.
These cover both SPF and DKIM in one flow.
How to set up SPF, DKIM, DMARC, and List-Unsubscribe for SendGrid. Provider-specific DNS records, step-by-step instructions, and the mistakes to avoid.
Check your domain while following this guide
Run a free SPF, DKIM, and DMARC check to see what is passing and what still needs fixing.
No signup required. Works on any domain.
Jump to section
SPF (Sender Policy Framework) is a DNS TXT record that lists which mail servers are allowed to send email on behalf of your domain. Receiving servers check it to decide whether to accept or flag your mail.
SendGrid uses CNAME-based domain authentication instead of a plain SPF TXT record. When you authenticate a domain in SendGrid, it creates a branded subdomain (like em.yourdomain.com) that handles SPF through CNAME delegation.
v=spf1 include:sendgrid.net ~all TXT record. Use the CNAME-based domain authentication instead. DKIM (DomainKeys Identified Mail) adds a cryptographic signature to outgoing email. Receiving servers verify the signature against a public key you publish as a DNS TXT record. A valid DKIM signature proves the message was not altered in transit and that it came from an authorized sender.
Selector for SendGrid: s1 and s2 (CNAME records pointing to SendGrid's key infrastructure)
s1._domainkey.yourdomain.com → s1.domainkey.uXXXX.wl.sendgrid.net.dkim=pass in the authentication results.dig TXT selector._domainkey.yourdomain.com +short
DMARC (Domain-based Message Authentication, Reporting, and Conformance) ties SPF and DKIM together. It tells receiving servers what to do with mail that fails both checks, and sends you reports about who is sending email on behalf of your domain. DMARC also requires alignment: the domain in your visible From header must match the domain authenticated by SPF or DKIM.
SendGrid domain authentication automatically handles DMARC alignment when you use a custom authenticated sending domain. Sending from sendgrid.net as your From domain will fail DMARC.
| Stage | DNS value | When to use it |
|---|---|---|
| Monitor | v=DMARC1; p=none; rua=mailto:[email protected]; fo=1 |
Start here. Collects reports without blocking any mail. |
| Quarantine | v=DMARC1; p=quarantine; pct=25; rua=mailto:[email protected]; fo=1 |
After 2-4 weeks at p=none with clean reports. Sends some failing mail to spam. |
| Reject | v=DMARC1; p=reject; pct=100; rua=mailto:[email protected]; fo=1 |
Full protection once SPF and DKIM alignment is verified. |
_dmarc (not @) with the p=none value above.[email protected] with a real inbox that can receive XML report emails.dig TXT _dmarc.yourdomain.com +short.The List-Unsubscribe header gives inbox providers like Gmail and Outlook a machine-readable way to offer a one-click unsubscribe button. When it is present and valid, Gmail shows an "Unsubscribe" link next to the sender name without the recipient needing to scroll to the bottom of the email. This reduces spam complaints and protects your sender reputation.
mailto: address as fallback.List-Unsubscribe-Post header to declare one-click support (required by Gmail's February 2024 guidelines for senders above 5,000 messages/day).List-Unsubscribe: <https://yourdomain.com/unsubscribe/TOKEN>, <mailto:[email protected]?subject=unsubscribe> List-Unsubscribe-Post: List-Unsubscribe=One-Click
mailto: link without a one-click HTTPS URL. Gmail and Outlook prefer the HTTPS method.To verify, send a test email to a Gmail address and look at "Show original". You should see the List-Unsubscribe header in the raw message headers.
After publishing all records, run these checks:
| Record | Command | What to look for |
|---|---|---|
| SPF | dig TXT yourdomain.com +short |
One TXT record starting with v=spf1 |
| DKIM | dig TXT selector._domainkey.yourdomain.com +short |
A TXT record starting with v=DKIM1 |
| DMARC | dig TXT _dmarc.yourdomain.com +short |
A TXT record starting with v=DMARC1 |
| All three | InboxGreen Free Check | Green pass on SPF, DKIM, and DMARC |
Check SPF, DKIM, DMARC and List-Unsubscribe for your domain in seconds.