Build a valid SPF record from the services that send your mail, then check what your domain publishes against the RFC 7208 rules.

Build the record on the left, or switch to the checker to read the SPF record a domain publishes right now — every mechanism explained, with the ten-lookup limit counted for you.

Who sends mail for this domain?

Tick every service that sends email using your domain in the From address. Each one adds the include: term it requires, and the DNS lookups it costs.

Your own servers
Adds mx — useful when the same servers send and receive. Costs one lookup.
Adds a — only needed when your site sends mail directly. Costs one lookup.
One per line. IP terms cost no DNS lookup, so prefer them when you can.
One domain per line — each becomes an include: term. Already-written terms are kept as they are.
What about everyone else?

The final term decides how receivers treat mail from any server not listed above.

Your SPF record
Publishing it
  1. Open the DNS zone of your domain at your registrar or DNS host.
  2. Delete any existing SPF record — a domain must publish exactly one.
  3. Add a TXT record on the root of the domain with the value above.
  4. Wait for the TTL to pass, then confirm it with the checker tab.
Record type
TXT
Name / host
@ (the root of the domain)
TTL
3600

A domain may publish only one SPF record. To add a new sender, edit the existing record — never add a second one.

Published record
DNS lookup budget
RFC 7208 allows ten
#TermFound in
Every term explained
TermResultWhat it does
What we found

About SPF Record Generator & Checker

The SPF Record Generator & Checker does the two jobs a domain owner actually needs. The generator asks which services send mail using your domain — Google Workspace, Microsoft 365, SendGrid, Mailgun, Amazon SES, your own servers — and assembles a valid `v=spf1` record from them, counting the DNS lookups it will cost as you build. The checker reads the record your domain publishes right now, explains every mechanism in plain language and tests it against RFC 7208.

The rule that catches most people is the ten-lookup limit. Every `include`, `a`, `mx`, `ptr` and `exists` term costs one DNS query, and so does every term inside the records they point at. Go over ten and receivers return a permanent error, which means SPF fails for all of your mail — not just the forged part. The checker follows your includes recursively and shows exactly where each lookup is spent, so you can see which sender pushed you over.

It also flags the failures that quietly undo an SPF record: a second SPF record on the same domain (which makes both invalid), `+all` (which authorises the entire internet), a missing `all` (which asserts nothing), the deprecated `ptr` mechanism, terms placed after `all` where they are never read, and syntax errors that turn the whole record into a permanent error.

How to use SPF Record Generator & Checker

  1. On the Generator tab, tick every service that sends email using your domain in the From address.
  2. Add your own mail servers: switch on mx, and paste any fixed IPv4 or IPv6 ranges — IP terms cost no DNS lookup.
  3. Watch the lookup meter. If it passes ten, drop a sender or replace an include with the IP ranges behind it.
  4. Choose the final policy: start at ~all (mark as suspicious) and tighten to -all once your DMARC reports are clean.
  5. Copy the record and publish it as a single TXT record on the root of your domain, replacing any existing SPF record.
  6. Come back to the Checker tab after the TTL has passed and confirm the published record parses cleanly.

Frequently asked questions

RFC 7208 allows a maximum of ten DNS-querying terms per evaluation: include, a, mx, ptr, exists and the redirect modifier. Lookups inside the records you include count too. Beyond ten, receivers return a permanent error and SPF fails for every message you send.

No. A domain must publish exactly one v=spf1 record. When a receiver finds two, it returns a permanent error and SPF fails for all your mail. To add a sender, edit the existing record rather than adding a second one.

Start with ~all, which tells receivers to accept unlisted senders but treat them as suspicious. Once your DMARC aggregate reports show every legitimate sender passing, switch to -all for full enforcement. Never use +all: it authorises the whole internet.

Remove senders you no longer use, replace an include with the ip4:/ip6: ranges behind it (IP terms cost no lookup), move newsletters onto a subdomain with its own record, or use a provider that offers a flattened record.

No. SPF only authorises sending servers, and it breaks when mail is forwarded. It has to be paired with DKIM and a DMARC policy for receivers to act on failures — which is exactly what Gmail and Yahoo have required from bulk senders since 2024.

Yes, completely free and with no sign-up. The generator runs in your browser and the checker performs a plain, rate-limited DNS lookup.


Popular searches
spf record generator spf checker spf record check spf lookup spf validator generate spf record spf record for google workspace spf 10 lookup limit check spf record for domain spf syntax checker
Need help?
Found an issue with this tool? Let our team know.
Report an issue

Add this free tool to your own website — copy and paste the code below.