Home
Lookup Tools
Analysis
Bulk & Enterprise
Resources
Close

SPF Record Email Auth

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.

Look Up SPF Records

Check SPF records for any domain using our free DNS lookup tool.

Look Up SPF Records →

What Is an SPF Record?

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.

SPF Record Format

An SPF record always starts with a version tag and contains mechanisms and qualifiers:

Basic SPF Record Structure

v=spf1 [mechanisms] [qualifier]all

Example SPF Record

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.

SPF Mechanisms

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

SPF Qualifiers

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

Common SPF Configurations

1. Google Workspace

v=spf1 include:_spf.google.com ~all

2. Microsoft 365

v=spf1 include:spf.protection.outlook.com -all

3. Multiple Services

v=spf1 include:_spf.google.com include:sendgrid.net include:mailchimp.com -all

4. Own Mail Server + Service

v=spf1 ip4:192.0.2.1 include:_spf.google.com -all

5. No Email (Null SPF)

If your domain doesn't send email:

v=spf1 -all

10 DNS Lookup Limit

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 Evaluation Order

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
  1. Check if sender IP is 192.0.2.1 → if yes, Pass
  2. Check if sender matches Google's SPF → if yes, Pass
  3. Match -allFail

SPF Record Best Practices

SPF vs DKIM vs DMARC

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.

Troubleshooting SPF

Common issues and solutions:

Check Your SPF Record

Use our DNS Record Finder to look up and validate SPF records for any domain.

Look Up SPF Records →

Related Record Types