Official DNS Guide • Transactional & Marketing Email

SendGrid (Twilio) SPF Record Setup & Validator

Configure SendGrid SPF record (include:sendgrid.net), CNAME automated security keys (s1/s2._domainkey), and custom return-path.

Quick Answer • Exact SendGrid SPF Syntax

To authorize SendGrid (Twilio) to send emails on behalf of your domain, add include:sendgrid.net to your domain's single DNS TXT SPF record before the terminating ~all mechanism. The standard record is v=spf1 include:sendgrid.net ~all.

Live SendGrid DNS Validator

Test your domain's published SPF, DKIM, and DMARC records via global DoH edge nodes in real time.

Zero-Log Client Evaluation

Understanding SendGrid (Twilio) Email Authentication

SendGrid by Twilio uses Automated Security (CNAME-based SPF and DKIM) where a custom subdomain (e.g. em.yourdomain.com) handles Return-Path alignment.

When SendGrid (Twilio) delivers outbound emails on your behalf, recipient mail transfer agents (MTAs) at Google, Yahoo, Microsoft, and corporate mail gateways inspect the sender identity. Without a published SPF record explicitly permitting SendGrid (Twilio)'s IP ranges, these emails trigger SPF Softfail (~all) or Hardfail (-all), severely degrading domain reputation and inbox placement.

Required DNS Records for SendGrid

Publish the following DNS records in your domain registrar or DNS management console (Cloudflare, AWS Route 53, GoDaddy, Namecheap):

TypeHost / NameValue / TargetTTLPurpose
TXT@v=spf1 include:sendgrid.net ~all3600Direct API root SPF authorization.
CNAMEs1._domainkeys1.domainkey.u123456.sendgrid.net3600Primary DKIM key.
CNAMEs2._domainkeys2.domainkey.u123456.sendgrid.net3600Secondary DKIM key.

Step-by-Step Setup Instructions

1

Log into SendGrid > Settings > Sender Authentication > Domain Authentication.

2

Enter your root domain. SendGrid generates 3 CNAME records.

3

Add the two DKIM CNAMEs (s1/s2._domainkey) and the Return-Path CNAME (em.domain.com).

4

Add "include:sendgrid.net" to your root SPF record.

5

Verify in SendGrid.

Common SendGrid SPF Configuration Mistakes

× DMARC Alignment Failure

Cause: Sending with From: user@domain.com while Return-Path is shared.

Fix: Complete CNAME Domain Authentication.

Frequently Asked Questions

What is the SPF include for SendGrid?

The SPF mechanism is "include:sendgrid.net".