TapCub is live — analytics, insights and live chat, free on one platform

Free tool SPF record generator: one record for every service that sends your mail

Tick the services that send email as your domain — Google Workspace, Microsoft 365, SendGrid, Mailgun, Amazon SES and others — add any servers of your own, and get a single v=spf1 TXT record. The generator counts the DNS lookups each include costs, warns before you pass the limit of 10, and links to the live checker once you publish.

  • 16 services built in
  • RFC 7208 checks
  • Runs locally

Build your SPF record

Everything that sends mail with your domain in the sender address must be listed. The record updates as you tick.

Generator

The domain in your sender addresses. Used for the DNS row and the check link; leave empty to build a record for any domain.

~all marks it suspicious, -all asks receivers to reject it. Start with ~all, move to -all once DMARC reports look clean.

Office mail servers, a website that sends contact-form mail, printers. One per line; ranges like 203.0.113.0/24 work.

One per line, for example 2001:db8::/48.

For a service not listed: paste the value from its setup page, with or without include:. One per line.

Your SPF record
v=spf1 include:_spf.google.com include:sendgrid.net ~all

Publish it as the only TXT record starting with v=spf1 on the domain.

DNS lookups

3

Limit 10

Characters

56

A TXT string holds 255

Checks

  • OK3 of 10 allowed DNS lookups used.
  • Note“~all” (soft fail): mail from unlisted servers is marked suspicious but usually still delivered. Common while you confirm every sender is listed.
  • NoteSendGrid: with “automated security” on, SendGrid publishes SPF for its own return-path subdomain through a CNAME, and the include is not needed on your root domain.
  • NoteAll services go in this one record. A second v=spf1 record on the same domain makes SPF fail for every message.

DNS record to add

In most DNS panels, @ means the domain itself. Replace any existing v=spf1 record instead of adding a second one.

TypeHostValueTTL
TXT@v=spf1 include:_spf.google.com include:sendgrid.net ~all3600
Zone-file format
example.com.	3600	IN	TXT	"v=spf1 include:_spf.google.com include:sendgrid.net ~all"

For BIND or DNS panels that import zone files; long records are already split into 255-character strings.

Runs entirely in your browser. Lookup counts use a dated copy of each provider’s include (2026-11-28); nothing is sent while you build the record.

Share these inputs: the values go after the # in the link, so they never reach a server.

Use this tool often? Save it to My tools.Saved to My tools. Find it any time at the top of the free tools page. You can also press Ctrl+D to bookmark this page in your browser.You can also press ⌘+D to bookmark this page in your browser.You can also tap your browser’s Share button (at the bottom in Safari) and choose Add Bookmark or Add to Home Screen.You can also open the ⋮ menu at the top right and tap ☆ to bookmark it, or choose Add to Home screen.You can also tap ··· at the top right and choose Favorite, or open it in your browser and bookmark it there.

Problem or suggestion?Send feedbackChat with support

Version v1.0Updated Update history

Use it via API:site/email-auth

Read the result

What the record says

An SPF record is a list of places allowed to send mail for the domain, read left to right.

  • 16 sending services built in
  • Counts the 10-lookup limit
  • Copy the TXT record, then check it live
SPF record generator illustration: Pick the services that send your email, add your own servers, and get one valid SPF record with its DNS lookups counted
SPF record generator, illustrated

v=spf1

Marks the TXT record as SPF. There must be exactly one per domain; two records are a permanent error, not a merge.

ip4 / ip6

Addresses written directly into the record. They cost no DNS lookups, which is why they come first.

include

Hands the decision to another domain’s SPF record, usually your email provider’s. Each costs at least one lookup, plus whatever that record includes in turn.

~all / -all

What to do with mail from anywhere not listed. DMARC treats both as an SPF failure; -all asks receivers to reject outright.

SPF checks the envelope sender (Return-Path), not the From address people see. DMARC ties the two together, so publish DMARC too.

How to use it

Four steps

About five minutes, plus the time your DNS provider takes to publish.

  1. 1

    List every sender

    Your mailbox provider, newsletter and transactional email services, help desk, CRM, website contact form and any office server.

  2. 2

    Tick and add

    Tick the services, paste includes from other services’ setup pages, and add your own IP addresses.

  3. 3

    Replace, do not add

    At your DNS provider, edit the existing v=spf1 TXT record on the domain, or create one if there is none.

  4. 4

    Check it live

    After the change is visible, run the SPF checker: it follows every include and counts the real lookups.

The rules

Limits from RFC 7208

Receivers stop evaluating a record that breaks these limits and treat it as a permanent error, which DMARC counts as a fail.

  • 10 DNS lookups in total: every include, a, mx, ptr, exists and redirect, including those inside the records you include
  • 2 void lookups (names with no record) are the suggested maximum before receivers give up
  • One record per domain; anything after all is ignored
  • 255 characters per TXT string; longer records are split into several strings and joined when read
  • ptr should not be used; +all lets the whole internet pass
Lookups used by common includes (2026-11-28)
ServiceIncludeLookups
Google Workspace_spf.google.com1
Microsoft 365spf.protection.outlook.com1
SendGridsendgrid.net2
Zoho Mailzohomail.com2
Mailgunmailgun.org5
Tencent Exmailspf.mail.qq.com8
Worked example

A company with three senders

Staff mail on Google Workspace, newsletters on SendGrid, and a web server at 203.0.113.25 that sends order confirmations.

Building the record
SenderTermLookups
Web serverip4:203.0.113.250
Google Workspaceinclude:_spf.google.com1
SendGridinclude:sendgrid.net2 (it includes ab.sendgrid.net)
Everyone else~all0

Result: v=spf1 ip4:203.0.113.25 include:_spf.google.com include:sendgrid.net ~all, 3 lookups. Adding Tencent Exmail (8) would push it to 11, over the limit; move that sender to a subdomain instead.

Common mistakes

What breaks SPF

Most broken records come from adding a service without touching what is already there.

A second v=spf1 record

New service, new TXT record: now both fail. Always merge into the one record.

Too many includes

Each provider costs one or more lookups. Past 10, SPF fails for every message, not only the last sender.

+all or ?all

+all authorises every server on the internet; ?all protects nothing. Use ~all or -all.

Forgetting a sender

The help desk or invoicing tool that sends “as” your domain fails SPF once you switch to -all. DMARC reports show who you missed.

FAQ

SPF record generator questions

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

How do I create an SPF record?

List every service that sends mail with your domain, tick them above or paste their include values, add your own IP addresses, and choose ~all or -all. Publish the result as one TXT record on the domain (host @), replacing any existing v=spf1 record.

What is the SPF record for Google Workspace and Microsoft 365?

Google Workspace: v=spf1 include:_spf.google.com ~all. Microsoft 365: v=spf1 include:spf.protection.outlook.com -all (21Vianet: spf.protection.partner.outlook.cn). If you use both, put both includes in one record.

Should I use ~all or -all?

Start with ~all while you confirm every sender is listed, then move to -all. DMARC treats both as an SPF fail; -all additionally lets receivers reject outright. Microsoft recommends -all once DKIM and DMARC are in place.

What happens if I go over 10 DNS lookups?

Receivers stop and return a permanent error, so SPF fails for every message, which DMARC counts as a fail. Fixes: remove services you no longer use, replace includes with stable IP ranges, or send bulk mail from a subdomain with its own record.

Can I have two SPF records?

No. Two v=spf1 records on one domain are a permanent error and both stop working. Merge them into one record with all the includes.

Do subdomains inherit the SPF record?

No. Each host name that sends mail needs its own record, for example news.example.com. Subdomains that never send can get v=spf1 -all.

Is SPF enough to stop spoofing?

No. SPF checks the hidden envelope sender, not the From address people see. Add DKIM signing and a DMARC policy so the visible domain is protected too.

Feedback

Is this tool working for you?

Rate it, or tell us what went wrong and what you’d like improved. A person reads every message, and frequent requests go into the next update.

Rate this tool

Please don’t include passwords or other sensitive information.

Only used to reply to this feedback.

Type, details and email are required.

We only use this to handle your feedback. See the privacy policy.

Feedback received

Thank you! We will read it and reply from hello@tapcub.com if needed.

Need help right now?

Chat with our support team, best for urgent problems; you can leave a message when we are offline.

Chat with support
Changelog

Update history

New features, fixes and data refreshes for this tool, newest first.

  1. · v1.0

    LaunchedFirst release.

Missing something or found an error? Tell us — requests that come up often go into the next update. All tool updates

Cite this tool

Recommend this tool in an article or on your site

This tool is free to cite and share. Copy the URL or link below into your article, tutorial or resource page; to write a review, embed a tool or partner with us, get in touch.

URL
https://tapcub.com/tools/spf-record-generator
HTML link
<a href="https://tapcub.com/tools/spf-record-generator">SPF record generator - TapCub</a>
Next step

Finish email authentication

SPF is the first of three records. Add DMARC to protect the From address and get reports on who sends as your domain.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics