SPF Record Generator

Build the SPF TXT record that authorises your mail senders, or paste an existing record to validate syntax and count DNS lookups against the limit of 10.

The SPF Record Generator runs entirely in your browser. Records are built and checked on your device — no DNS queries are made and nothing is uploaded.

Open the DMARC Record Generator

About SPF Record Generator

SPF Record Generator builds the one TXT record that tells receiving mail servers who may send email as your domain. Tick the providers you send through — Google Workspace, Microsoft 365, SendGrid and friends map to their documented include mechanisms — add any servers of your own by IP, and choose what happens to everyone else: ~all softfail while you are still discovering senders, -all reject once the list is complete. The checker side parses any existing record the way a receiver would: it verifies the v=spf1 prefix, flags the deprecated ptr and the catastrophic +all, warns about terms after all that receivers ignore, and counts DNS-querying mechanisms against the hard limit of 10 that silently breaks so many records.

Features

How to use the SPF Record Generator

  1. Pick the providers that send mail for your domain
  2. Add your own server IPs if any, and set the all policy
  3. Copy the record into a TXT record on your root domain
  4. Or switch to Check mode and paste an existing record to audit it

Example

Input

Google Workspace + SendGrid · ~all

Output

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

Two DNS lookups of the allowed ten — plenty of headroom.

Common errors & troubleshooting

Frequently asked questions

What is an SPF record and why does my domain need one?
It is a DNS TXT record listing the servers allowed to send email claiming to be your domain. Receivers check the connecting server against it; without SPF, spammers can forge your address freely and your legitimate mail inherits the reputation damage.
Should I end my SPF record with ~all or -all?
Start with ~all — failures are marked but delivered, so a forgotten sender does not lose mail while you complete the list. Move to -all once reports show every legitimate source passing; that is the setting that actually blocks spoofing.
What is the SPF 10 DNS lookup limit?
RFC 7208 caps the DNS-querying mechanisms — include, a, mx, ptr, exists, redirect — at ten per evaluation, counted recursively through nested includes. Exceeding it returns permerror, which many receivers score like a failure. Each provider include typically costs one to three.
Does SPF alone stop email spoofing?
No. SPF checks the envelope sender, not the From header the user sees, and it breaks on plain forwarding. Pair it with DKIM signatures and a DMARC policy — the three together are what receivers treat as real authentication.
Where do I publish the SPF record?
As a TXT record on the bare domain (often written @ in DNS panels), value starting v=spf1. Subdomains that send mail need their own records, and domains that never send should publish v=spf1 -all to shut spoofers out.

Related tools

All ArrayKit tools