SPF Record Generator: Create a Valid SPF Record in Seconds
Enter your domain, pick the email provider that sends for you and choose soft or hard fail. mailX writes the SPF TXT record, or tells you when your provider does not need one.
Results
- Free SPF generator
- 49 email providers
- No signup required
What this SPF generator gives you
A record built from each provider's own documentation, not a guess.
The right include
The exact include for your provider, such as include:_spf.google.com for Google Workspace or include:spf.protection.outlook.com for Microsoft 365.
A ready-to-paste TXT record
The full record, from v=spf1 to the final all, with the name to use in your DNS.
Soft or hard fail
~all (soft fail) to start safely, or -all (hard fail) once you are sure every sender is listed.
Provider notes
Region or plan variants, such as IONOS US vs Europe or Zoho data centers, and what to do when a provider needs a different setup.
When no root SPF is needed
Many sending services (SendGrid, Mailchimp, Postmark, Amazon SES...) handle SPF on their own return-path domain. The generator says so instead of adding a useless include.
49 services covered
Mailbox providers, hosting companies, marketing platforms, helpdesks and transactional email services.
How to create and publish your SPF record
Five steps to authorize your senders without breaking SPF.
List every service that sends as your domain
Your mailboxes (Google Workspace, Microsoft 365...), plus marketing, CRM, helpdesk and billing tools. Forgetting one is the most common SPF mistake.
Generate the record for your main provider
Pick it in the list and choose ~all to start. The result gives the value to publish.
Merge every sender into one record
A domain can only have one SPF record. If you use several services, put all their includes in the same record, before the final ~all or -all.
Publish it as a TXT record
Add it at the root of your domain (@ in most DNS hosts) and remove any older SPF record.
Check it
Run the SPF checker to confirm there is a single valid record, then move to -all when you are confident every sender passes.
What is an SPF record?
SPF (Sender Policy Framework) is a TXT record that lists the servers allowed to send email for your domain. When a message arrives, the receiving server checks whether the sending IP is authorized by the SPF record of the return-path domain. If it is not, SPF fails.
An SPF record always starts with v=spf1, lists mechanisms such as include:, ip4: or mx, and usually ends with an all qualifier: -all fails every unlisted sender, ~all soft-fails them. A redirect= modifier can replace it. SPF alone does not protect your From address: DMARC ties SPF to the visible From domain through alignment.
Two limits break many records. A domain can have only one SPF record, and evaluating it must not take more than 10 DNS lookups. Each include, a, mx, ptr, exists and redirect counts, including the lookups inside the includes.
SPF record for Google Workspace:
Google Workspace and Microsoft 365 merged in one record:
Related mailX tools
Check the result and finish your email authentication.
SPF includes for popular email providers
These are the values the generator returns for the most used services. Add the include of every service you use to the same record.
Many marketing and transactional platforms do not need an include on your root domain. SendGrid, Postmark, Kit, ActiveCampaign, Intercom, Klaviyo, SparkPost, ZeptoMail and SMTP2GO pass SPF on a return-path subdomain of your domain once you add the CNAME records they give you. Amazon SES and Resend do the same with an MX and an SPF record on a MAIL FROM subdomain. Mailchimp, Mailchimp Transactional and Brevo use their own return-path domain, so DMARC passes through DKIM with your domain. In every case, set up their domain authentication instead. HubSpot is different: it gives you an SPF include specific to your account.
Mailbox providers:
Microsoft 365: include:spf.protection.outlook.com
Zoho Mail (US data center): include:zohomail.com
iCloud+ custom domain: include:icloud.com
Fastmail: include:spf.messagingengine.com
Proton Mail: include:_spf.protonmail.ch
Yandex 360: include:_spf.yandex.net
Hosting and business email:
IONOS (Europe): include:_spf-eu.ionos.com
Hostinger Email: include:_spf.mail.hostinger.com
Namecheap Private Email: include:spf.privateemail.com
Titan Email: include:spf.titan.email
OVHcloud: include:mx.ovh.com
Rackspace Email: include:emailsrvr.com
Apps and sending services that do need an include:
Mailjet: include:spf.mailjet.com
Zendesk: include:mail.zendesk.com
Freshdesk: include:email.freshdesk.com
Salesforce: include:_spf.salesforce.com
Elastic Email: include:_spf.elasticemail.com
Common SPF mistakes
What breaks SPF, and how to avoid it.
Two SPF records
Publishing a second record for a new tool makes SPF fail with a permanent error. Merge everything into one record.
More than 10 DNS lookups
Every include, a, mx, ptr, exists and redirect counts, including nested ones. Remove tools you no longer use and avoid includes that are not needed.
Useless includes
Adding includes for services that use their own return-path domain, such as SendGrid or Mailchimp, uses lookups without helping DMARC.
Hard fail too early
Switching to -all before every sender is listed can send your own emails to spam or get them rejected.
Wrong region or plan
IONOS, Zoho and Microsoft government clouds use different values. Pick the variant that matches your account.
Using +all
+all authorizes every server on the internet to send as your domain. Never publish it.
SPF guides
Get your SPF record right the first time.
9 SPF Record Examples
Ready-to-adapt SPF records for Google Workspace, Microsoft 365 and common sending platforms.
What Is SPF in Email?
How SPF works, what each mechanism means and why it matters for deliverability.
Multiple SPF Records: How to Fix Them
One domain, one SPF record: how to merge several senders into a single record.
How to add the SPF record in your DNS host
Open the DNS settings of your domain and look for an existing TXT record that starts with v=spf1. If there is one, edit it and add the new include before the final all. If there is none, create a TXT record at the root of the domain (@ or empty name, depending on the DNS host) and paste the generated value.
Save, wait a few minutes, then run the SPF checker. It should find exactly one record.
Cloudflare, GoDaddy, Namecheap and most DNS hosts:
Name / Host: @
Value: v=spf1 include:_spf.google.com ~all
TTL: default or 1 hour
Reading your generator result
What each result means and what to do next.
Record generated with ~all
A safe starting point: unlisted senders soft-fail. Merge the include into your existing record if you already have one.
Record generated with -all
Strict: unlisted senders fail. Use it once every service that sends as your domain is in the record.
No root SPF needed
Your provider passes SPF on its own return-path domain. Follow the notes to add its CNAME and DKIM records instead.
SPF is only one third of the job
Check that SPF, DKIM and DMARC all pass for your domain, in one free test.