SEOlust logo SEOlust
Security & Privacy

SPF Record Generator

Build a correct SPF TXT record by ticking the services that send your email, with a live DNS-lookup counter so you stay under the 10-lookup limit. Runs in your browser. Free.

All tools
@ (your root domain, e.g. example.com)

💡 How to use

  • Tick every service that sends email for your domain, then publish this as a single TXT record on your root domain.
  • You may only have one SPF record per domain — merge all senders into this one record.
  • Keep it under 10 DNS lookups. Start with ~all, switch to -all once you're confident. Runs in your browser.

Free SPF Record Generator

Build a valid SPF (Sender Policy Framework) TXT record for your domain by ticking the services that send your email. Combine Google Workspace, Microsoft 365, mail servers and custom IPs into one correct record, with a live DNS-lookup counter so you stay under the limit. Free, no sign-up, runs in your browser.

What an SPF record does

SPF is a DNS record that lists which servers are allowed to send email using your domain. When a receiving server gets a message from you, it checks the SPF record and can reject or flag mail from servers that aren't listed. It's one of the three pillars of email authentication and a prerequisite for DMARC. This tool assembles the record correctly so you don't have to memorise the syntax.

How to use it

Point and click:

  • Tick each service that sends email for your domain (Google, Microsoft, your own servers).
  • Add any other includes or extra IP addresses.
  • Choose your all policy — ~all while testing, -all when confident.
  • Publish the value as a single TXT record on your root domain.

The 10-lookup limit

SPF allows a maximum of 10 DNS-lookup mechanisms (each <code>include</code>, <code>a</code>, <code>mx</code>, <code>ptr</code>, <code>exists</code> and <code>redirect</code> counts). Exceed it and your SPF returns a permerror and stops working. This generator counts lookups live and warns you as you approach the limit, so you can swap heavy includes for direct <code>ip4</code>/<code>ip6</code> entries if needed.

Only one SPF record per domain

A domain must have exactly one SPF record. If you use several senders — say Google for mailboxes and a marketing platform for campaigns — you merge them all into a single record rather than publishing two. This tool does that merging for you: tick every sender and it outputs one combined record.

Choosing your all policy

The final <code>all</code> mechanism decides what happens to servers not on your list. <code>~all</code> (softfail) marks unlisted mail as suspicious but still delivers it — the safe choice while you confirm you've listed every sender. <code>-all</code> (fail) tells receivers to reject it, which is the strongest protection once you're sure your list is complete. <code>?all</code> (neutral) does nothing and is rarely useful.

SPF is part of a bigger picture

SPF on its own doesn't fully stop spoofing — pair it with DKIM signing and a DMARC policy. Once your SPF is published, use our DMARC Record Generator to add enforcement and reporting, and our SPF/DKIM/DMARC Checker to verify all three are valid together. Everything here is generated locally in your browser; nothing is uploaded.

FAQ

Is this SPF generator free?
Yes. It is completely free, runs in your browser, and needs no account.
Where do I publish the SPF record?
Publish it as a single TXT record on your root domain (host @). Do not use a dedicated SPF record type — plain TXT is correct.
Can I have more than one SPF record?
No. A domain must have exactly one SPF record. Merge all your senders into one record — this tool does that for you.
What is the 10-lookup limit?
SPF allows at most 10 DNS-lookup mechanisms. Going over causes a permerror. The tool counts them live and warns you; use ip4/ip6 entries to reduce lookups.
Should I use ~all or -all?
Start with ~all (softfail) while confirming every sender is listed, then switch to -all (fail) for the strongest protection.
Do I still need DKIM and DMARC?
Yes. SPF alone doesn't fully prevent spoofing. Add DKIM and a DMARC policy — use our DMARC Record Generator and SPF/DKIM/DMARC Checker.
Is my data uploaded anywhere?
No. The record is built entirely in your browser from your inputs.

Related tools

Pro tip: pair this tool with Robots.txt Exposure Checker and Cookie Security Checker for a faster SEO workflow.