A SendGrid SPF record tells receiving mail servers that SendGrid may send mail for your domain. The record is a DNS TXT entry, and SendGrid's own example for a domain that sends only through the service is v=spf1 include:sendgrid.net -all. In practice most customers never type that line, because SendGrid domain authentication generates the records for you and can keep them up to date.
This guide explains the SendGrid SPF record, how SPF relates to its two companion standards, which DNS entries SendGrid creates, the lookup cap that breaks long records and the mistakes that make verification fail. All of it follows SendGrid's documentation as read in November 2026, and BillionVerify is not affiliated with SendGrid or Twilio.
Key facts (checked November 2026):
- SendGrid's SPF guide calls SPF the first factor of domain authentication and uses a single include as its example.
- The same guide cites RFC 7208, which caps SPF evaluation at ten lookups, and warns that careless include use can exceed it.
- The domain authentication guide says setup generates four entries, and that setting is on by default.
- DKIM is the second factor and DMARC the third, and SendGrid's DKIM article lists key sizes of 1024 or 2048 bits.
- Sender authentication covers the sending server, not the contents of your list, so a clean list is its own task.
- BillionVerify checks the recipients you send to, which the three authentication standards do not.
What a SendGrid SPF Record Does
Sender Policy Framework, or SPF, lets a domain say which servers may send mail on its behalf. A domain owner adds the list as a TXT record in DNS. When a message arrives, the receiver looks up the SPF record for the domain in the message's envelope sender and compares the IP address of the sending server with the authorized list. If the check passes, the server accepts the message, and if it fails, the server follows the policy in the domain's DMARC record when it has one.
SendGrid explains where SPF stops. It does not verify the content of a message, check that the message was not altered, or tell the receiver how to handle a failure. It only covers sender identity. DKIM covers message integrity and DMARC covers policy and reporting, which is why SendGrid treats the three as factors of one domain authentication system.
Screenshot: SPF documentation, which defines the record and the check a mail host runs.
The SPF Record Format
An SPF record always starts with v=spf1, which marks it as version one. After that come mechanisms that list who may send, and the record ends with an all mechanism that covers everybody else. SendGrid's guide lists the common mechanisms: a, aaaa, mx, ptr, ip4, ip6, include and exists. The include mechanism is the one SendGrid users meet, because it pulls in another domain's list.
Each mechanism can carry a qualifier. A plus means pass, a tilde means soft fail, a minus means fail and a question mark means neutral. A record ending in tilde all asks receivers to accept but mark messages from unlisted hosts, and one ending in minus all asks them to reject. SendGrid's examples show mx tilde all for a domain served by its own MX hosts, and a bare minus all for a silent domain.
For a sender using SendGrid and nothing else, the documented record is the one shown above. Several mechanisms can share one record, as the guide's examples show, and the closing all always comes last.
Domain Authentication Instead of a Hand-Made Record
SendGrid recommends domain authentication, and SendGrid domain authentication runs from the sender authentication area of the console. During setup you work through the prerequisites, pick a setup option and review some advanced settings. SendGrid then produces four entries. The set depends on a single setting called automated security, which is on by default.
In the default mode, you receive a CNAME for a branded return-path address, which supports both checks, two further CNAMEs for link branding, and a TXT record for DMARC. SendGrid then creates and keeps the sender records current for you. Its documentation offers an illustration: if you buy a dedicated IP, SendGrid adds that address to your SPF record on your behalf. With automated security off, SendGrid hands you the MX value and three text values and you must enter and update them yourself.
Screenshot: the part of the authentication guide that lists the generated DNS records.
There is one catch. If your DNS provider does not accept underscores in CNAME records, you cannot use it and must switch it off. The guide also describes a custom bounce subdomain, which appears in DNS as a CNAME that points at sendgrid.net, and a custom link subdomain for click tracking.
SendGrid DKIM
SendGrid DKIM, the second factor, signs each message with a private key so the receiver can confirm the content was not changed in transit. The signature is checked against a public key published as a text entry named with a selector, in the form selector, then _domainkey, then your domain. The SendGrid DKIM article says that key pairs come in 1024-bit or 2048-bit form, and that SendGrid sets its canonicalization to relaxed for the header and simple for the body, written as relaxed/simple.
On a SendGrid account you rarely create those keys by hand, since SendGrid DKIM setup is part of the guided flow. In the default mode, SendGrid handles the DKIM signing and the SPF authentication through CNAME records, and the signature is added when mail goes out. The setup screen also has a custom DKIM selector option for the case where another service already uses the default selector name. Our SendGrid SMTP guide shows how the same sender identity ties into an SMTP login.
Screenshot: DKIM documentation, which introduces the protocol and its signing concepts.
DMARC and the Third Factor
DMARC instructs the receiver what to do when a message fails SPF or DKIM, and it reports failures back to the domain owner. It sits in DNS as a text entry built from semicolon-separated tags, and the policy can be none, quarantine or reject. The SendGrid DMARC guide explains the problem it solves: spoofing, where an unauthorized sender forges the visible From address, which can damage the reputation of the real domain.
DMARC itself is not about list quality either. It checks the sender and tells mailbox providers how to react, and it reports on authentication results, so it works alongside the other two instead of replacing them.
Screenshot: DMARC documentation, which describes spoofing and the policy record.
The Ten-Lookup Limit
RFC 7208 allows at most ten DNS lookups when a receiver evaluates an SPF record. Lookups come from the include, a, mx, ptr and exists mechanisms, along with the redirect modifier. SendGrid's guide warns that poor use of include is the usual way to cross the line.
The practical advice is to keep the record short. Remove includes for services you no longer use, write ip4 and ip6 entries where you know the addresses because those need no lookup, and review the record on a regular schedule. SendGrid also suggests checking the result with an outside SPF tool. A free SPF checker on BillionVerify can read your published record, and a DKIM checker does the same for the signature key.
Fixing Verification Problems
Most failures come from how DNS hosts handle names. SendGrid gives an example: you are told to add a CNAME named em123.example.com, but your DNS provider adds your domain to whatever you type, so it stores em123.example.com.example.com and the check fails. The fix is to enter only the host part, em123, and let the provider append the domain.
A second cause is a DNS provider that rejects underscores in alias names, which blocks that mode and calls for the manual route. A third is a DKIM selector clash with another service, which the custom selector setting exists to solve. After any change, rerun the verification in the console before assuming something else is wrong.
SPF Is Not a Clean List
Authentication answers a question about the sender. It says nothing about whether the people you send to still exist. A domain with flawless authentication can still see its reputation fall if too many messages go to dead mailboxes, because each hard bounce signals carelessness to the receiving provider. SendGrid's documentation says once an address bounces it is added to a bounce list and later requests are dropped, but that happens after the damage of the first bounce.
So authentication and list hygiene are two halves of one job. After you finish the DNS records, check the recipients too. An email verifier tests single addresses, and bulk email verification cleans a file before an import. BillionVerify charges 1 credit for each valid or invalid result and nothing for unknown results, reports catch-all addresses as their own class and gives a free account 20 credits on each day it is used, up to 600 a month, with no card.
For sign-ups you do not recognize, a reverse email lookup shows what is publicly tied to them, and a phone number validator confirms numbers if you also text users. For the wider picture of the product, read what SendGrid is.
FAQs
What is the SendGrid SPF record?
The documented example is the string from the opening paragraph, a TXT entry on your sending domain that authorizes SendGrid's servers. Customers who follow the guided setup, SendGrid domain authentication, usually get it handled for them.
Do I still need an SPF record if I use domain authentication?
SendGrid looks after the sender records for you when that mode is on. If you turn it off, you must add the SPF, DKIM, MX and DMARC values yourself.
Why does SPF say too many DNS lookups?
Because the specification allows only ten, and each mechanism of those kinds uses one. Trim unused includes and use ip4 or ip6 entries where you can.
Which DNS records does SendGrid create?
By default, four: a CNAME for the bounce domain, a pair of link-branding CNAMEs and a DMARC TXT. With it off, you receive the values and type them in at your DNS host.
Does SPF stop bounces?
No. Bounces come from recipient mailboxes that do not work, so checking the list is a separate step from authentication.
Watch: How to Verify an Email: Single, Bulk, File and API
Watch: How to Validate a Phone Number: Free Phone Number Validator





Top comments (0)