SPF record generator

Pick the services that send email for you and get one SPF record that stays under the 10-lookup limit.

Runs in your browser. Nothing is published until you paste it.
Who sends as your domain?
Everyone else
Use -all unless you are still finding senders in your DMARC reports.
Your record 1 of 10 lookups
Type
TXT
Host
@ (yourdomain.com)
Value
v=spf1 include:_spf.google.com ~all
TTL
3600
Then: publish it as the only TXT record that starts with v=spf1 on your domain, then check it with the SPF checker.

Next

Ken sets up SPF, DKIM and DMARC for every inbox it sends from.
Connect a domain and Ken checks the records, counts the lookups and tells you before a change breaks sending.
Start free - 1,000 credits, no card

What the SPF generator does

Tick the services that send mail as your domain and the generator writes one SPF record with the right include for each. It keeps a running count of DNS lookups as you add senders, so you see the limit of 10 coming before you publish.

You can add your own servers as ip4 and ip6 ranges, which cost no lookups, and choose how the record ends: -all to reject unlisted senders, or ~all to soft fail them while you finish the list.

Choosing what to include

List every service that sends mail with your domain in the Return-Path: your mailbox provider, a sequencer that sends over its own SMTP, your CRM, help desk, billing and marketing tools. A tool that sends through your Google or Microsoft inboxes is already covered by that provider's include.

If a service uses its own bounce domain, it doesn't need to be in your record at all. Check its docs before you add it. An include you don't need costs lookups and widens the set of servers that can pass as you.

How to publish the record

Create one TXT record at the root of the domain, the host most DNS panels show as @, with the generated value. If a v=spf1 record already exists, replace it. Never add a second one.

Most DNS hosts take the value without quotes and add them for you. A record longer than 255 characters has to be stored as several strings inside one TXT record, and receivers join them back together without spaces.

Then run the SPF checker to confirm the record resolves and the lookup count matches what the generator showed.

Why it matters for cold email

A new sending domain should have SPF before warmup starts. Gmail and Yahoo require SPF or DKIM from all senders, and both from bulk senders.

Keep sending domains simple. A cold email domain usually sends through one mailbox provider, so its record can be a single include and an all. Marketing tools and the help desk belong on your main domain or their own subdomain. Fewer includes means fewer lookups and fewer ways for the record to break.

Questions

What is the SPF record for Google Workspace?
v=spf1 include:_spf.google.com ~all. That include costs 1 of your 10 lookups, because Google's record lists its IP ranges directly instead of nesting more includes. Run the SPF checker after publishing to confirm the count.
What is the SPF record for Microsoft 365?
Microsoft documents v=spf1 include:spf.protection.outlook.com -all for domains that send only through Microsoft 365. If other services send as your domain, add their includes before the all.
Where do I put the SPF record?
In a TXT record on the domain you send from, at the root, the host shown as @ in most DNS panels. SPF isn't inherited, so a subdomain that appears in the Return-Path needs its own record.
Should I use ~all or -all?
~all while you're still finding every service that sends as you, and -all once you're sure the list is complete. With DMARC published, most receivers let the DMARC policy decide what happens to failing mail either way.
Can I include more than one sending service?
Yes, one include per service in a single record. Watch the count. Each include costs at least one lookup and often several, and the total across all nested includes must stay at 10 or under.

More in Deliverability

30 tools.