The SPF record (Sender Policy Framework) is a DNS TXT record that specifies which mail servers are authorized to send email on behalf of your domain. SPF helps prevent email spoofing by allowing receiving servers to verify that incoming mail comes from an authorized source.
Check SPF records for any domain using our free DNS lookup tool.
Look Up SPF Records →An SPF record lists all IP addresses and domains that are allowed to send email for your domain. When a receiving mail server gets an email from your domain, it checks the SPF record to verify whether the sending server is authorized.
SPF records are published as TXT records in DNS. While there was once a dedicated SPF record type, it's now deprecated — all SPF data should be in TXT records.
An SPF record always starts with a version tag and contains mechanisms and qualifiers:
v=spf1 [mechanisms] [qualifier]all
example.com. 3600 IN TXT "v=spf1 ip4:192.0.2.0/24 include:_spf.google.com -all"
This record authorizes the IP range 192.0.2.0/24 and Google's mail servers to send email for example.com, and rejects all other sources.
Mechanisms define which sources are authorized to send email:
| Mechanism | Description | Example |
|---|---|---|
ip4 |
Match IPv4 address or range | ip4:192.0.2.1 or ip4:192.0.2.0/24 |
ip6 |
Match IPv6 address or range | ip6:2001:db8::/32 |
a |
Match domain's A/AAAA records | a or a:mail.example.com |
mx |
Match domain's MX servers | mx or mx:example.com |
include |
Include another domain's SPF | include:_spf.google.com |
exists |
Check if domain exists | exists:%{i}.spf.example.com |
all |
Match everything (used at end) | -all or ~all |
Qualifiers prefix mechanisms to define the result when matched:
| Qualifier | Meaning | Result |
|---|---|---|
+ (Pass) |
Authorized (default if omitted) | Accept the email |
- (Fail) |
Not authorized | Reject the email |
~ (SoftFail) |
Probably not authorized | Accept but mark suspicious |
? (Neutral) |
No policy | Treat as if no SPF exists |
v=spf1 include:_spf.google.com ~all
v=spf1 include:spf.protection.outlook.com -all
v=spf1 include:_spf.google.com include:sendgrid.net include:mailchimp.com -all
v=spf1 ip4:192.0.2.1 include:_spf.google.com -all
If your domain doesn't send email:
v=spf1 -all
SPF records are limited to 10 DNS lookups total. Each include, a,
mx, and exists counts as a lookup. Nested includes also count.
Exceeding this limit causes SPF to fail (PermError).
SPF mechanisms are evaluated left to right. The first match determines the result:
v=spf1 ip4:192.0.2.1 include:_spf.google.com -all
-all → Fail| Protocol | Verifies | Protects Against |
|---|---|---|
| SPF | Sending server IP | Unauthorized servers sending as your domain |
| DKIM | Email signature | Message tampering and forgery |
| DMARC | SPF + DKIM alignment | Domain spoofing (ties it all together) |
All three should be used together for comprehensive email authentication.
Common issues and solutions:
Validate your SPF, DKIM, and DMARC configuration to ensure your domain's email is fully protected.
Start free DNS Explorer trial14-day full-feature trial
Use our DNS Record Finder to look up and validate SPF records for any domain.
Look Up SPF Records →