SPF record generator
Build one SPF record for every service that sends your mail, with the includes from each provider's docs and an estimate of the 10 DNS lookups. Runs in your browser.
Your SPF record
| Type | TXT |
|---|---|
| Host | example.com (@ at most DNS hosts) |
| DNS lookups | 0 of 10 (estimate) Count them exactly |
v=spf1 ~all
Nothing will be allowed to send as example.com itself. Add any other senders above first.
The record is longer than 255 characters, so it is split into strings. Most DNS hosts do this for you; in a zone file, write it like this:
Separate SPF records for sending subdomains
These services check SPF on their own MAIL FROM / Return-Path subdomain, so their include goes in a record there, not in the record above, and does not count toward its 10 lookups.
Before you publish
- Important
SPF_MULTIPLE_RECORDSPublish this as the only SPF record on the host. If the domain already has a TXT record that starts with v=spf1, replace it with this one (paste the old one under Other senders to merge it). Two SPF records make SPF fail for every message.
- Error
SPF_TOO_MANY_LOOKUPSThe SPF record needs more than 10 DNS lookups.
Recommendation: Reduce the number of lookups, for example by removing includes for services that no longer send mail.
- Error
SPF_PASS_ALLThe SPF policy ends with +all.
Recommendation: List the legitimate senders and end the record with -all instead, or with ~all when DMARC is enforcing (p=quarantine or p=reject in effect; t=y counts one step lower).
- Warning
SPF_NEUTRAL_ALLThe SPF policy ends with ?all.
Recommendation: List all legitimate senders, then end the record with a hard fail, or with softfail (~all) once DMARC is enforcing.
- Warning
SPF_PTR_MECHANISMAn SPF record uses the ptr mechanism.
Recommendation: Replace ptr with ip4, ip6, a or include terms.
- Info
SPF_SOFTFAIL_ALLThe SPF policy ends with softfail (~all).
Recommendation: If DMARC is not enforcing yet, confirm that every legitimate sender is listed and then end the record with a hard fail instead of softfail. With an enforcing DMARC policy, softfail is acceptable.
The includes probably need more than 10 DNS lookups in total. Above 10, SPF returns a permanent error and fails for all your mail.
Recommendation: Remove services you no longer use, or move a bulk sender to its own subdomain. Count the exact number once the record is live.
Freshdesk:
include:email.freshdesk.comcosts 7 of your 10 DNS lookups on its own. Above 10, SPF fails for all your mail.Recommendation: Freshdesk documents one smaller include per data center (1 lookup each): US
include:fdspfus.freshemail.io, EUinclude:fdspfeuc.freshemail.io, INDinclude:fdspfind.freshemail.io, AUinclude:fdspfaus.freshemail.io. If you know which data center your account uses, untick Freshdesk and paste that include under Other senders. These records leave outsendgrid.net, whichinclude:email.freshdesk.comincludes. (Measured by Lookproof on 2026-11-21, not stated in Freshdesk's docs.) If DMARC reports show SPF failing for Freshdesk mail sent from SendGrid IPs, useinclude:email.freshdesk.cominstead. Freshdesk guideYour own includes are counted as 1 lookup each; the records behind them can need more.
Count the whole tree with the SPF lookup counter.
The record is longer than 255 characters. One TXT string holds at most 255, so it must be split into several strings in the same record, not into several records.
No senders: this record says the domain sends no mail. If that is true, lock the domain down completely with null MX, SPF -all and DMARC reject.
None of the services you picked needs an include in this record. It still says that no other server may send mail as this domain, which is right if nothing else sends.
The all term you pasted was left out. The ending is the one chosen above.
Terms that appeared twice are listed once.
No other warnings. Check the record with the SPF lookup counter once it is live.
About your services
- Google Workspace: include:_spf.google.com on the domain your users send from. Google Workspace guide
- Microsoft 365: include:spf.protection.outlook.com. GCC High, DoD and 21Vianet use another include; see the Microsoft 365 guide. Microsoft 365 guide
- mailbox.org: include:mailbox.org on the domain itself. mailbox.org guide
- Zoho Mail: include:zohomail.com. Zoho suggests include:one.zoho.com if you use several Zoho services; it costs 4 lookups. Zoho Mail guide
- Fastmail: include:spf.messagingengine.com on the domain itself. Fastmail guide
- Proton Mail: include:_spf.protonmail.ch. Follow the SPF tab in Proton if it differs. Proton Mail guide
- Zendesk: include:mail.zendesk.com, directly in this record (Zendesk asks for it in the first layer, not inside another include). Zendesk guide
- Freshdesk: include:email.freshdesk.com covers all four Freshdesk data centers and costs about 7 lookups. Freshdesk guide
- Cloudflare Email Routing: include:_spf.mx.cloudflare.net on the root domain. Cloudflare Email Routing guide
- Cloudflare Email Sending: include:_spf.mx.cloudflare.net on the cf-bounce subdomain, which Cloudflare adds when you onboard the domain. Cloudflare Email Sending guide
- MailerLite: include:_spf.mlsend.com. Compare with the value on your Domains page. MailerLite guide
- Amazon SES: include:amazonses.com belongs on your custom MAIL FROM domain, such as bounce.example.com. Without one, SES uses its own domain and needs no include here. Amazon SES guide
- Mailgun: include:mailgun.org belongs on the domain you added to Mailgun, often a subdomain such as mail.example.com. It costs about 5 lookups. Mailgun guide
- SendGrid: SPF belongs on the return-path subdomain (em1234.example.com). With automated security that is a CNAME and needs no include; add include:sendgrid.net only where SendGrid shows it. SendGrid guide
- Resend: include:amazonses.com belongs on the send subdomain (send.example.com), not on the root domain. Resend guide
- Postmark: no include needed. Postmark says it is no longer required in your own SPF record; SPF is checked on its Return-Path domain (a CNAME such as pm-bounces). Postmark guide
- Mailjet: include:spf.mailjet.com on the root domain, as Mailjet asks. SPF aligns only with a custom Return-Path; see the Mailjet guide. Mailjet guide
- Mailchimp and Mailchimp Transactional (Mandrill): no include. Their docs ask for DKIM CNAME records and DMARC, with no SPF step. Mailchimp / Mandrill guide
- Klaviyo: no include. The branded sending domain's NS or CNAME records connect it to SPF records Klaviyo manages. Klaviyo guide
- Shopify: no include. The CNAME records from domain authentication handle SPF. Shopify Email guide
- Customer.io: no include. Its SPF record sits on its own subdomain (cio12345.example.com), outside your lookup limit. Customer.io guide
- HubSpot: the include has your account number in it, such as include:123456.spf03.hubspotemail.net. Copy it from HubSpot into Other senders. HubSpot guide
- Brevo: the developer docs list no SPF record. If the Brevo app shows an include, copy it into Other senders. Brevo guide
Run the full email security check DMARC, SPF, DKIM, MX and MTA-STS in one free report.
How it works
Tick every service that sends mail as your domain and add your own servers under Other senders. The generator then builds one SPF record and updates it as you type. Nothing is looked up and nothing leaves your browser.
- Services. Each service on the list carries the include from its own documentation, with the page and the date we read it noted in our source code. Where we have a provider guide for the service, the include is the one the guide documents. A service whose docs ask for no include adds nothing and tells you why.
- Your own senders. Type
ip4:,ip6:,a,mx,include:orexists:terms, separated by spaces. A bare IP address getsip4:orip6:in front of it. Pasting an existing record works too:v=spf1and itsallterm are dropped and the rest is merged. Anything the record could not use, such as a macro orredirect=, is refused with a message instead of being published. - Order. IP ranges come first, then
a,mxand the includes, so receivers can often match without any DNS lookup. - The ending. You choose how receivers treat mail from servers not listed:
~all,-all,?allor+all.
The warnings follow the engine that runs the full check. Every record the generator can build is parsed by the same SPF parser as the SPF record parser in our tests, so +all, ?all and ptr give the same finding codes here as there. The lookup estimate adds the counted cost of each include; above 10 the record would fail with a permanent error. A record longer than 255 characters is shown split into strings, because one TXT string holds at most 255.
Common mistakes
- Two SPF records. Every service tells you to add its record. Merge them into one instead.
- Counting includes instead of lookups. The limit is 10 DNS lookups for the whole tree, nested includes counted. One include can cost five.
- Includes on the wrong name. A service with its own Return-Path subdomain gains nothing from an include on your root domain.
- A domain that sends no mail. It needs more than
v=spf1 -all: add a null MX and DMARC reject with the lockdown tool.
Frequently asked questions
Where do I publish the SPF record?
As a TXT record on the domain mail is sent from, so on example.com itself (@ at most DNS hosts). SPF is checked on the envelope sender (Return-Path), so a service that uses its own bounce subdomain, such as Amazon SES with a custom MAIL FROM domain, needs its include on that subdomain instead. For Amazon SES, Mailgun, SendGrid and Resend the generator leaves the include out of this record and shows a separate record for the subdomain.
I already have an SPF record. Should I add a second one?
No. A name may hold only one TXT record that starts with v=spf1. With two, receivers return a permanent error and SPF fails for all your mail (SPF_MULTIPLE_RECORDS). Paste your current record under Other senders: the generator merges its terms with the services you pick, and you replace the old record with the new one.
Should the record end in ~all or -all?
We suggest ~all (softfail). RFC 9989 warns that some receivers check SPF early in the SMTP transaction, so -all can get mail rejected before DMARC runs, even when aligned DKIM would have passed it. With DMARC at p=quarantine or p=reject, DMARC decides what happens to forged mail. Never use +all, which lets any server send as your domain, and avoid ?all, which says nothing.
How exact is the lookup count?
It is an estimate. For each service we counted the DNS lookups behind its include with real DNS on the date in our source notes, and your own includes count as 1 each. Services change their records, so once the record is live, run the SPF lookup counter: it walks the whole include tree and gives the exact number against the limit of 10.
Why do some services add no include?
Because their docs ask for none. Postmark, Mailchimp, Klaviyo, Shopify and Customer.io send with their own Return-Path domain or set up SPF through CNAME or NS records, so SPF on your domain does not cover their mail and an include would only cost lookups. HubSpot and Brevo show an account-specific value in their app; paste that under Other senders.
Is anything sent to Lookproof?
No. The generator runs only in your browser. Nothing you type leaves the page, and there is no account. To check the record once it is published, run the email security check.
- Amazon SES
- Brevo
- Cloudflare Email Routing
- Cloudflare Email Sending
- Customer.io
- Fastmail
- Freshdesk
- Gandi
- Google Workspace
- HubSpot
- Klaviyo
- Loops
- mailbox.org
- Mailchimp
- MailerLite
- Mailgun
- Mailjet
- Microsoft 365
- Namecheap Private Email
- Postmark
- Proton Mail
- Resend
- Shopify
- Squarespace
- Twilio SendGrid
- Zendesk
- Zoho Mail