Free tool
SPF Record Generator
An SPF record is one TXT record on your domain, starting with v=spf1, that lists every server allowed to send your email. Tick the services you use, add your own IPs, and copy a single valid record. The counter keeps you under the limit of 10 DNS lookups.
Your SPF record
TXTUse @ or leave the host blank for the root domain, depending on your DNS provider. Publish one SPF record per domain.
- Tick the services that send email for your domain, or add your own IPs, to build the record.
How it works
Build, count, publish
-
List every sender
Tick each service that sends mail with your domain in the envelope sender, and add your own servers by IP. Import an existing record to start from it.
-
Watch the lookup count
Every include, a and mx costs DNS lookups, and nested includes count too. SPF breaks above 10, so the counter warns you before you publish.
-
Publish one TXT record
Copy the value into a single TXT record on your root domain, replacing any older SPF record. Then check it with the deliverability checker.
Using the result
What the lookup count means
-
7 lookups or fewer
Comfortable. You have room to add a new service later without breaking SPF.
-
8 to 10 lookups
Valid, but one more include could push you over. Remove unused senders now.
-
More than 10 lookups
Receivers return a permanent error (permerror) and treat SPF as failed for every message. Cut includes before publishing.
Provider counts come from each provider's published SPF record as of October 2026, expanded through every nested include. Providers edit these records without notice, so recheck after you publish. Custom includes are counted as 1, so the total is a minimum.
Before you publish
- One record only. Two TXT records starting with v=spf1 make SPF fail with a permanent error (RFC 7208, section 3.2).
- Long records are split. A TXT string holds at most 255 characters. Longer records are published as several quoted strings, which receivers join with no spaces (section 3.3).
- Keep it short. RFC 7208 suggests keeping the DNS answer under 450 octets so it fits in one UDP packet (section 3.4).
- SPF alone is not enough. Add DKIM for each service and a DMARC record, which Gmail and Yahoo require for bulk senders.
FAQ
SPF record FAQ
What does an SPF record look like?
An SPF record is a TXT record on your domain that starts with v=spf1, lists the servers allowed to send your mail, and ends with an all rule. For example: v=spf1 include:_spf.google.com ~all lets Google Workspace send for you and soft fails everything else.
Can I have two SPF records?
No. RFC 7208 says a domain with more than one SPF record returns a permanent error, so SPF fails for all your mail. Merge every sender into one record. Use the import box above to paste both records and get a single merged one.
What is the SPF 10 lookup limit?
SPF allows at most 10 mechanisms that need a DNS lookup while checking a message: include, a, mx, ptr, exists and redirect. Lookups inside nested includes count toward the same 10. ip4, ip6 and all do not use lookups.
Should I use ~all or -all?
~all (soft fail) marks unlisted senders as suspicious, while -all (fail) says they are not allowed. With a DMARC policy published, receivers act on DMARC rather than the SPF qualifier, so ~all is a common, lower-risk choice. Use -all only when you are certain the list is complete.
Why does my email service not need an SPF include?
Some services, such as Postmark and Amazon SES by default, send with their own bounce (Return-Path) domain. SPF is checked against that domain, not yours, so an include on your root domain does nothing. For DMARC alignment they rely on DKIM or a custom bounce subdomain instead.
Keep going
Related guides and tools
-
What is SPF?
How receivers check the envelope sender against your record.
Open -
DMARC Record Generator
Add a policy and reporting on top of SPF and DKIM.
Open -
What is DMARC?
Why SPF needs to align with your From domain.
Open -
Email Deliverability Checker
Check the SPF, DKIM and DMARC you have published.
Open
Sources
- RFC 7208: Sender Policy Framework (SPF)
- RFC 7208, section 3.2: Multiple DNS records
- RFC 7208, section 3.3: Multiple strings in a single DNS record
- RFC 7208, section 4.6.4: DNS lookup limits
- Google Workspace: SPF setup
- Microsoft 365: SPF setup
- Zoho Mail: SPF setup
- Fastmail: SPF setup
- Proton Mail: SPF setup
- Mailgun: SPF setup
- SendGrid: SPF setup
- Amazon SES (custom MAIL FROM): SPF setup
- Mailchimp Transactional (Mandrill): SPF setup
- Brevo (Sendinblue): SPF setup
- Salesforce: SPF setup
- Zendesk: SPF setup
- Freshdesk: SPF setup
- Mailchimp (campaigns): SPF guidance
- Postmark: SPF guidance
- Klaviyo: SPF guidance
- SparkPost: SPF guidance
- HubSpot: SPF guidance
SPF set? Now stop the bounces
Authentication proves your mail is yours. Verifying your list keeps invalid addresses from dragging your reputation down.
100 free credits · No card required · Credits never expire