How to use SPF Record Generator
The SPF Record Generator builds a correct, syntactically valid Sender Policy Framework record from simple choices about who sends your email, so you do not have to memorise SPF’s mechanism grammar. You pick the mail providers and servers that are allowed to send for your domain — Google Workspace, Microsoft 365, your own mail server, marketing platforms — and the tool assembles the includes, ip4 entries and the correct closing all qualifier. The result is a single TXT record you paste into DNS, helping prevent spoofing and keeping your legitimate mail out of the spam folder.
- Select the email providers and services that send on your behalf.
- Add any additional sending IP addresses or hostnames you operate.
- Choose an enforcement level: softfail (~all) or hardfail (-all).
- Copy the generated SPF TXT record.
- Publish it on your domain’s root as a TXT record and verify with a checker.
Your data never leaves your device — 100% private processing.
Choosing softfail or hardfail
The closing all mechanism sets the policy for servers not otherwise authorised. Softfail (~all) tells receivers to accept but flag unlisted mail, which is forgiving and a safe choice while you confirm you have listed every legitimate sender. Hardfail (-all) instructs receivers to reject unlisted mail outright, giving the strongest anti-spoofing protection. The recommended path is to deploy with ~all, monitor for a couple of weeks to be sure nothing legitimate is being missed, then switch to -all for full enforcement.
Keeping within the lookup limit
SPF permits at most ten DNS lookups during evaluation, and each include or mechanism that resolves a name counts toward it. Adding many providers can quietly push you over the limit, which causes a permerror and undermines the whole record. The generator helps by keeping the record compact and warning when you add enough includes to approach the ceiling. If you genuinely need more senders than ten lookups allow, consolidating vendors or flattening includes into ip4 ranges is the standard remedy.
| Provider | Include |
|---|---|
| Google Workspace | include:_spf.google.com |
| Microsoft 365 | include:spf.protection.outlook.com |
| SendGrid | include:sendgrid.net |
| Mailchimp | include:servers.mcsv.net |
Glossary
- SPF
- Sender Policy Framework — a TXT record naming authorised senders for a domain.
- include
- A mechanism that imports another domain’s SPF policy into your own.
- ip4 / ip6
- Mechanisms that authorise specific sending IP addresses or ranges.
- all
- The final mechanism setting the default result for unlisted senders.
- Lookup limit
- SPF’s cap of ten DNS lookups per evaluation.
Related reading
Frequently Asked Questions
Why use SPF Record Generator?
- Build a syntactically correct SPF record without memorising mechanism grammar
- Add common provider includes automatically by selecting from a list
- Choose softfail or hardfail enforcement and see the resulting record immediately
- Produce a record that stays within the ten-lookup SPF limit from the start
Common use cases
- Generate a complete SPF record after setting up Google Workspace for a new domain
- Add a marketing platform to an existing SPF policy without breaking its syntax
- Create a hardfail SPF record for a parked domain that should never send mail
- Build the correct merged record when migrating from one mail provider to another
- Verify the lookup count before publishing to ensure SPF evaluation will not error
Get weekly tool tips & updates
New tools, power-user tips, and productivity hacks — delivered free every Friday.
No spam, ever. Unsubscribe with one click.
Related Network & DNS
SPF Record Checker
Check the SPF (Sender Policy Framework) record for any domain. Validate your email authentication setup and spot misconfigurations instantly.
DMARC Record Generator
Generate DMARC DNS TXT records for your domain. Set policy, alignment, and reporting email addresses. Free DMARC policy generator.
DKIM Record Lookup
Look up DKIM (DomainKeys Identified Mail) DNS records for any domain and selector. Verify your DKIM email authentication setup.
MX Record Lookup
Look up MX (Mail Exchanger) records for any domain. Find which mail servers handle email delivery and check their priority order instantly.
TXT Record Lookup
Look up TXT records for any domain. View SPF, DMARC, DKIM, and domain-verification TXT records instantly to debug email and ownership setup.
DNS Lookup Tool
Look up DNS records for any domain — A, AAAA, MX, NS, TXT, CNAME, SOA, and CAA records. Free, instant results pulled from authoritative nameservers.
Explore all Network & DNS.