Guides › SPF
What is an SPF record? A plain-English guide
SPF (Sender Policy Framework, RFC 7208) is a TXT record at your domain that lists which servers may send mail for it. Receivers check the connecting server's IP against the list. Strictly, SPF checks the envelope sender (Return-Path), not the visible From address. That's why DMARC's alignment check matters.
v=spf1 ip4:203.0.113.10 include:_spf.google.com include:sendgrid.net ~all
| Part | Meaning |
|---|---|
| v=spf1 | Version. It must be first. |
| ip4: / ip6: | Authorise an IP or range. Costs no DNS lookup. |
| include: | Also authorise whatever that domain's SPF allows. Costs 1+ lookups. |
| a / mx | Authorise your domain's A or MX hosts. Costs 1 lookup each. |
| ~all | Soft-fail everything else (recommended with DMARC). |
| -all | Hard-fail everything else. |
Rules: exactly one SPF record per domain, and at most 10 DNS lookups.
Check your domain now