Understanding SPF (Sender Policy Framework) and email authentication
SPF (Sender Policy Framework) is a DNS-based email authentication protocol that specifies which mail servers are authorized to send emails for a domain. SPF records are published in DNS and list authorized sending IP addresses and servers.
When an email is received, the receiving server checks the SPF record to verify the sending server is authorized. SPF prevents email spoofing, improves deliverability, and helps ISPs identify legitimate senders.
SPF is one of three main email authentication protocols (SPF, DKIM, DMARC). Check your SPF records and use our email authentication checker to verify SPF is properly configured.
Domain owners publish SPF records in DNS as TXT records, specifying which mail servers are authorized to send emails for the domain.
When an email is sent, it includes the sender's domain in the "From" address.
Receiving mail servers perform SPF checks by querying DNS for the sender's domain SPF record.
The receiving server verifies whether the sending IP address is listed in the SPF record as authorized.
SPF check results (pass, fail, softfail, neutral, none) are recorded in email headers and used for deliverability decisions.
SPF results are combined with DKIM results and evaluated against DMARC policies.
SPF records are DNS TXT records in this format: v=spf1 ip4:192.0.2.0/24 include:_spf.google.com ~all
v=spf1 ip4:192.0.2.1 include:_spf.google.com -all authorizes IP 192.0.2.1, includes Google's SPF, and fails all other IPs.
SPF checks produce specific results:
The sending IP is authorized according to the SPF record. This is the desired result for legitimate emails.
The sending IP is explicitly not authorized. Emails with fail results are often rejected or marked as spam.
The sending IP may not be authorized, but the policy suggests accepting the email with caution. Often used for monitoring.
The SPF record doesn't specify authorization status for this IP. Provides no authentication benefit.
No SPF record found for the domain. Missing SPF records hurt deliverability and increase spam filtering.
List all mail servers and IP addresses authorized to send emails for your domain, including ESPs and third-party services.
Create an SPF record including all authorized IPs and services. Use include: for third-party services like email providers.
Publish the SPF record as a TXT record in your domain's DNS, typically at the root domain (e.g., example.com).
Use our SPF lookup tool to verify the record is published correctly.
Send test emails and use our authentication checker to verify SPF passes.
Monitor SPF authentication results in email headers to ensure proper configuration.
Verify SPF configuration and results:
Use our SPF lookup tool to check if SPF records are published and formatted correctly.
Use our comprehensive authentication checker to verify SPF authentication is working correctly.
Review Received-SPF or Authentication-Results headers in emails to verify SPF results.
Monitor email deliverability and spam filtering to ensure SPF is helping, not hurting, deliverability.
Update SPF records when adding or changing mail servers or email service providers.