Create perfect SPF records with the world's most advanced SPF generator - Prevent the 10-lookup limit and optimize email deliverability
Sender Policy Framework (SPF) is an email authentication protocol defined in RFC 7208. It allows domain owners to specify which mail servers are authorized to send email on behalf of their domain, helping prevent email spoofing and phishing attacks.
SPF works by publishing a specially formatted TXT record in your domain's DNS. When a receiving mail server gets an email claiming to be from your domain, it checks your SPF record to verify the sending server is authorized.
Example SPF Record:v=spf1 ip4:192.0.2.0/24 include:_spf.google.com -all
Our SPF generator, built by DigiCert, is the world's most advanced SPF record creation tool. Here's what makes it unique:
Simply select your email providers from our comprehensive list. We automatically include the correct SPF entries for Google Workspace, Microsoft 365, SendGrid, Mailchimp, and dozens more.
Our unique feature shows exactly how many DNS lookups your SPF record will consume. We expand all includes and calculate the total, helping you stay under the 10-lookup limit.
We automatically flatten nested includes where possible and suggest optimizations to reduce lookups while maintaining security.
See exactly what changes you're making with our visual diff tool. Green highlights show additions, red strikethrough shows removals.
SPF records use various mechanisms to define authorized senders. Understanding these is crucial for creating effective records:
References another domain's SPF record. Counts as one DNS lookup plus any lookups in the included record.
Example: include:_spf.google.com
Authorizes specific IP addresses or ranges. No DNS lookup required - most efficient mechanism.
Examples: ip4:192.0.2.1
or ip6:2001:db8::/32
Authorizes servers listed in A or MX records. Each counts as one DNS lookup.
Examples: a:mail.example.com
or mx
Matches everything. Always placed at the end with a qualifier.
Examples: -all
(fail), ~all
(softfail), ?all
(neutral)
Qualifiers: Each mechanism can be prefixed with + (pass), - (fail), ~ (softfail), or ? (neutral). Default is + if omitted. See RFC 7208 Section 4.6 for details.
RFC 7208 Section 4.6.4 mandates that SPF evaluation must not exceed 10 DNS lookups. This prevents denial-of-service attacks but can be challenging for organizations using multiple email services.
include:
mechanismsa
and mx
mechanismsexists:
mechanismsptr
mechanisms (deprecated)ip4:
and ip6:
mechanismsall
mechanismWarning: Exceeding 10 lookups results in a "permerror" and your emails may be rejected. Our generator helps you stay within this limit.
Only one SPF record is allowed per domain. Multiple records cause permanent errors.
Common errors: Missing "v=spf1", incorrect quotes, typos in mechanisms.
This allows anyone to send email for your domain, defeating the purpose of SPF.
Missing legitimate senders causes email delivery failures.
Provider SPF records change. Your includes may break without notice.
After creating your SPF record with our generator, follow these steps to ensure it works correctly:
Pro Tip: Use our DNS Lookup Tool to verify your SPF record is published correctly and check how many lookups it consumes.