SPF Record

DNS Record Types
Sender Policy Framework record.
← Back to Glossary

What is an SPF Record?

An SPF record (Sender Policy Framework) is a DNS TXT record that specifies which mail servers and IP addresses are authorized to send email on behalf of a domain. SPF is a critical email authentication mechanism that helps receiving mail servers verify that incoming messages come from legitimate sources, reducing spam and preventing email spoofing attacks.

SPF Record Syntax

Basic Structure

v=spf1 [mechanisms] [qualifier]all

Common Mechanisms

MechanismPurposeExample
ip4Authorize IPv4ip4:192.0.2.0/24
ip6Authorize IPv6ip6:2001:db8::/32
aDomain's A record IPsa:example.com
mxDomain's MX serversmx
includeInclude another SPFinclude:_spf.google.com

Qualifiers

SPF Record Examples

Google Workspace

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

Multiple Providers

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

SPF Lookup Limits

SPF has a 10-lookup limit:

Best Practices

1. Start with ~all, tighten to -all later

2. Stay under 10 DNS lookups

3. Combine with DKIM and DMARC

4. Test before deploying

SPF is essential for email authentication, protecting your domain from being used in spam and phishing attacks.

Put This Knowledge to Work

Use DomScan's API to check domain availability, health, and more.