What this SPF record generator does
An SPF record is a TXT record that lists the servers allowed to send email for your domain. Receivers check it on every message: if the sending server is not listed, SPF fails, and DMARC may send the email to spam or reject it. A typo, a missing sender or one include too many is enough. This SPF record generator is built to avoid all three:
- Sixteen common senders with the includes their own documentation gives, from Google Workspace and Microsoft 365 to SendGrid, Mailgun, Salesforce and Zendesk, plus custom includes and IP addresses.
- A live DNS lookup count. The SPF generator follows every include, including the includes inside them, and counts lookups as you build, with the cost of each include shown.
- Checks while you build: syntax, the 10-lookup limit, record length, the
allpolicy, and, when you enter your domain, whether your mail provider (found from your MX records) is authorised. - Load current record. Turn the record you already publish into a form, add or remove a sender, and replace it. Terms the form has no field for are kept as written.
- Bulk mode writes the record for every sending domain at once, as a table or a CSV file.
Create SPF record: step by step
This is how to create SPF record text with the SPF record generator, whether you start from scratch or from the record you already have:
- List who sends as your domain: your mailbox provider, plus any newsletter tool, CRM, help desk, billing system or website server that sends email from an address on the domain.
- Enter your domain in the SPF record generator and press Load current record if one exists.
- Pick a preset or tick your senders. Add other includes or IP addresses under Other senders.
- Choose the policy:
~allfor most domains,-allif you prefer strict. - Check the lookup count stays at 10 or below and read the checks.
- Copy the record and add it at your DNS host as a TXT record on the root (host
@), replacing any existing SPF record. - Verify it with the SPF checker once DNS has updated.
Which services belong in your SPF record?
Only services that send email from your domain’s servers, or with your domain in the bounce address, need an entry. The includes below are the ones each service documents, with the number of DNS lookups each one cost when we measured them on 23 November 2026:
| Sender | SPF include | DNS lookups |
|---|---|---|
| Google Workspace | include:_spf.google.com | 1 |
| Microsoft 365 (Office 365) | include:spf.protection.outlook.com | 1 |
| Zoho Mail | include:zohomail.com | 2 |
| Fastmail | include:spf.messagingengine.com | 1 |
| Proton Mail | include:_spf.protonmail.ch | 2 |
| SendGrid | include:sendgrid.net | 2 |
| Mailgun | include:mailgun.org | 5 |
| Amazon SES (custom MAIL FROM only) | include:amazonses.com | 1 |
| Postmark | include:spf.mtasv.net | 1 |
| Mailchimp Transactional (Mandrill) | include:spf.mandrillapp.com | 1 |
| Brevo | include:spf.brevo.com | 1 |
| Mailjet | include:spf.mailjet.com | 1 |
| SparkPost | include:sparkpostmail.com | 2 |
| Salesforce | include:_spf.salesforce.com | 2 |
| Zendesk | include:mail.zendesk.com | 1 |
| Freshdesk | include:email.freshdesk.com | 7 |
Three groups need no include at all. Cold email sequencers such as Instantly, Smartlead and lemlist send through your own Google Workspace or Microsoft 365 inboxes, so the provider’s include already covers them. Services that use their own bounce domain, such as Mailchimp’s marketing emails and Postmark by default, pass SPF on their domain and rely on DKIM for yours. And forwarding is the receiving side’s problem, not yours. Some services, HubSpot among them, give each account its own include; copy it from the service’s DNS settings into Other includes. Tick any service in the table in the SPF record generator and it adds the include for you.
~all or -all: choosing the SPF policy
The last term of the record says what receivers should do with mail from any server not listed:
| Ending | Name | Meaning | When to use it |
|---|---|---|---|
~all | Soft fail | Accept, but treat as suspicious | Most domains, with DMARC. Google’s default; the SPF generator’s default. |
-all | Fail | Reject or mark as failed | Microsoft’s recommendation; domains that send no email |
?all | Neutral | No opinion | Only briefly while testing |
+all | Pass | Any server may send | Never: it lets anyone send as your domain |
Once DMARC is published, the difference between ~all and -all is small: DMARC applies your policy to mail that fails both SPF and DKIM alignment. Create a DMARC record with the DMARC record generator.
Staying under the 10 DNS lookup limit
Every include, a, mx, exists and redirect makes receivers look something up in DNS, and so does every one of those inside the records you include. RFC 7208 caps the total at 10. Go over and SPF returns PermError, which counts as a fail for DMARC, for all your mail, not just the extra sender.
That is why this SPF record builder counts lookups through nested includes rather than counting the includes you typed. Two senders can look harmless and cost twelve. Ways to stay under the limit:
- Remove senders you no longer use. Old newsletter tools and trial accounts are the usual culprits; the SPF record generator’s per-include count shows which ones cost most.
- Drop
aandmxunless those servers really send mail; with Google or Microsoft they rarely do. - Move a service to a subdomain. Send marketing email from
news.yourdomain.comwith its own SPF record, and the main record stays small. - Use IP addresses for servers you control;
ip4andip6cost no lookups. - Flatten with care. Replacing includes with their current IP addresses saves lookups, but breaks silently when the provider changes IPs. Prefer the steps above.
How to publish the SPF record at your DNS host
Add a TXT record on the root of the domain. Most DNS hosts call the root @; some want the field left blank or the full domain name. The value is the record from the SPF record generator, starting with v=spf1. Amazon Route 53 wants the value in double quotes. Use the TXT type: the old SPF record type was retired in 2014.
Most important: one SPF record per domain. If the domain already has a TXT record starting with v=spf1, edit that record. Adding a second one makes every SPF check fail with PermError, a mistake the SPF checker catches and fixes with a merged record.
SPF record examples from the generator
Each SPF record example below is what the SPF record creator produces for a common setup. The SPF checker page explains the full syntax and has more examples, including the SPF record for Google Workspace and the SPF record for Office 365 in detail.
| Setup | SPF record | Lookups |
|---|---|---|
| Google Workspace (cold email domain) | v=spf1 include:_spf.google.com ~all | 1 |
| Microsoft 365 | v=spf1 include:spf.protection.outlook.com -all | 1 |
| Google Workspace plus SendGrid | v=spf1 include:_spf.google.com include:sendgrid.net ~all | 3 |
| Microsoft 365 plus your own server | v=spf1 ip4:203.0.113.10 include:spf.protection.outlook.com -all | 1 |
| Domain that sends no email | v=spf1 -all | 0 |
Copy any SPF record example into your DNS as it is, or open the matching preset in the SPF record creator above to add your own senders. Every SPF record example here stays well under the lookup limit.
SPF records for many cold email domains
A cold email setup often has ten or fifty sending domains, all on the same provider, so they all need the same SPF record. To create SPF record entries for all of them at once, the Many domains at once tab of the SPF record generator takes your list, asks whether the inboxes are on Google Workspace or Microsoft 365, and writes one row per domain, ready to copy or download as a CSV for your DNS host’s bulk import. Keep the sending domains simple: one provider, one include, nothing else. That leaves room to spare under the lookup limit and nothing to break.
Common SPF mistakes
- Two SPF records on one domain, usually after adding a new provider’s record instead of editing the old one.
- An include for a sequencer that sends through your Google or Microsoft inboxes. It wastes lookups and authorises servers that never send your mail.
- Forgetting a sender, such as the help desk or billing tool, which then fails SPF and DMARC.
- Going over 10 lookups by adding senders one at a time without counting.
- Using
ptr, which is slow, unreliable and discouraged by the standard. - Ending in
+all, which authorises every server on the internet. - Typos such as
include:_spf.gooogle.comor a missing space, which the live check in the SPF generator catches.
SPF is one of four records
SPF says which servers may send. DKIM signs each email, DMARC tells receivers what to do when checks fail, and MX receives the replies. Gmail, Yahoo and Outlook expect SPF, DKIM and DMARC from bulk senders, and without MX no replies arrive. After you create SPF record entries for your domains, check them all at once with the free email deliverability test, then look up your keys with the DKIM checker.
Or let PureMail do it: we publish SPF, DKIM, DMARC and MX on every domain and set up Google Workspace or Microsoft 365 inboxes on them, connected to your sequencer, in about four hours, from $2.90 an inbox.