Now open. Sign up with a work email and get 250 free credits, no card. Get your free API key →
FOR AGENTSSkip the HTML: llms.txt · openapi.json · MCP mcp.dizo.ai/mcp

SPF record generator

Tick the services that send mail for your domain, add your own servers and IP ranges, and get a ready-to-publish SPF TXT record.

Services that send mail as your domain
Your own servers

Runs in your browser. Nothing is sent to Dizo. The lookup count covers the mechanisms in this record. Includes can contain more lookups of their own, so check the published record with the SPF checker.

A clean SPF record protects your domain. Sending to real addresses protects it too: the Dizo email finder returns a work email only when it validates, at 1 credit if found. See the email finder →

How to use it

  1. Enter your domain so the DNS instructions show the right host.
  2. Tick each service that sends email as your domain, such as Google Workspace or Microsoft 365.
  3. Add any other include: domains your vendors gave you, plus ip4 and ip6 ranges for your own servers.
  4. Choose ~all (soft fail) or -all (hard fail) for every other server.
  5. Check the lookup count and warnings, then copy the record into a single TXT record at @.

What an SPF record does

SPF (Sender Policy Framework) is a TXT record that lists the servers allowed to send mail using your domain in the envelope sender (the Return-Path). A receiving server reads the record from left to right and stops at the first mechanism that matches the connecting IP address. If nothing matches, the final all mechanism decides the result.

A record always starts with v=spf1. The common mechanisms are include: (use another domain's SPF record), ip4: and ip6: (allow an address or range), a and mx (allow the servers behind your own A or MX records), and all. The qualifier in front of all sets the result for everyone else: -all is a hard fail, ~all is a soft fail, and ?all is neutral.

The 10-lookup limit, with a worked example

RFC 7208 caps the number of mechanisms that trigger DNS queries at 10 per SPF check. include, a, mx, exists, ptr and the redirect modifier each count as one, and nested includes count too. ip4, ip6 and all cost nothing. Go over 10 and receivers return a permanent error, which most treat as an SPF failure.

Example: mx (1) plus includes for Google Workspace (1), SendGrid (1) and Salesforce (1) gives 4 lookups in your record. If those providers' own records add 1, 2 and 3 more, the real total is 10, right at the limit. Adding one more vendor would break SPF for every message. This generator counts the lookups in your record. Use the SPF checker on the published record to see the nested total.

Common mistakes

Two SPF records. A domain must publish exactly one TXT record that starts with v=spf1. Two records give a permanent error, so merge new mechanisms into the existing record instead of adding another.

Leftover vendors. Old includes for tools you stopped using still spend lookups and still authorize those servers. Remove them. Jumping straight to -all. Start with ~all, watch your DMARC reports for legitimate senders you missed, then tighten. Forgetting subdomains. SPF is checked per domain, so a subdomain that sends mail, such as mail.example.com, needs its own record.

FAQ

Should I use ~all or -all?

Start with ~all while you confirm every legitimate sender is listed. Once your DMARC reports show nothing missing, -all is stricter. With an enforced DMARC policy, most receivers act on the DMARC result either way.

My vendor is not in the list. What do I add?

Use the exact include value from the vendor's own setup docs and paste it into Other includes. Some providers give each customer a unique value, so copy it from your account rather than guessing.

Where do I publish the record?

Create one TXT record at the root of the domain (host @) with the generated value. DNS changes usually show up within minutes to a few hours, depending on the TTL.

Does SPF alone stop spoofing?

No. SPF checks the envelope sender, not the From address people see. You need DKIM and a DMARC policy that requires alignment to protect the visible From domain.

Related tools

All free tools →