Guides › Transactional

SendGrid (Twilio) SPF record & DKIM setup

The exact SPF include for SendGrid (Twilio), how many of your 10 DNS lookups it costs right now, and how to turn on DKIM so you pass DMARC.

SPF

If SendGrid (Twilio) is your only sender, publish this TXT record at your root domain (@):
v=spf1 include:sendgrid.net ~all

Already have an SPF record? Don't add a second one. Add include:sendgrid.net before the ~all, or use the SPF merger.

Live lookup cost: 2 lookups

Current record at sendgrid.net:

v=spf1 ip4:167.89.0.0/17 ip4:208.117.48.0/20 ip4:50.31.32.0/19 ip4:198.37.144.0/20 ip4:198.21.0.0/21 ip4:192.254.112.0/20 ip4:168.245.0.0/17 ip4:149.72.0.0/16 ip4:159.183.0.0/16 ip4:134.128.64.0/18 ip4:159.26.176.0/20 include:ab.sendgrid.net ~all

Measured live from DNS and refreshed daily. SendGrid (Twilio) can change this at any time, which is exactly why monitoring matters.

DKIM

With automated security on, SendGrid gives you CNAMEs for s1._domainkey and s2._domainkey plus a return-path CNAME (which handles SPF for you).

DMARC

SPF and DKIM only protect you once DMARC ties them to your visible From: address. If you don't have one yet, start with:

TXT record at _dmarc
v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com;

Official documentation: SendGrid (Twilio) docs

Using SendGrid (Twilio) with another service?

Check that SendGrid (Twilio) is set up correctly on your domain