Sign up and contact support in the bottom-right corner to get 20 free checks.Sign up free
Free email toolkit

SPF record generator

Build an SPF TXT draft from known sending IPs and provider include domains. Choose how unmatched sources should be treated, then copy the output to your DNS provider after reviewing all legitimate senders.

No account required

SPF record generator
example.comTXT
v=spf1 ip4:192.0.2.10 ~all
ip4 / ip6
include
all

Illustrative data, not a live result or a ready-to-publish configuration.

Generate a candidate DNS TXT record locally. Review before publishing; this tool does not publish DNS. SPF includes can add recursive lookups beyond the ten-lookup limit. External DMARC report destinations may require DNS authorization. Begin monitoring before enforcing a stricter policy.

Loading tool…

What are you building with an SPF generator?

The generator turns an inventory of authorized sending sources into an SPF TXT value. Those sources can include your mail service, marketing platform and application servers. It formats your choices; it cannot discover forgotten senders, validate ownership of an IP or publish DNS for you. Start from the existing policy rather than replacing it without review.

Supported inputs produce ip4, ip6, include and optional mx mechanisms followed by your chosen all qualifier. An include authorizes sources according to another SPF policy; it is not a general reference to any website. The mx mechanism is appropriate only if incoming mail servers also send with this envelope domain.

How to use this tool

  1. List every legitimate service using the envelope-sender domain. Obtain current IP ranges and include targets from those services; do not copy the example values on this page.
  2. Enter the sources and select the ending qualifier deliberately. Review the generated value against the existing record so a new service does not remove authorization for an older one.
  3. Publish one SPF TXT policy at the correct DNS name. Run the SPF checker after publication, including recursive dependencies, then send real test messages from each service.
A worked example
v=spf1 ip4:192.0.2.10 include:_spf.example.net ~all

The sample authorizes one documentation IPv4 address and sources covered by _spf.example.net, then marks other senders with softfail through ~all. A provider decides how to handle that result. Changing to -all expresses fail, not a guaranteed rejection rule; ?all expresses neutral. The sample is a teaching aid, not a ready-to-publish policy.

Illustrative data, not a live result or a ready-to-publish configuration.

Mistakes to avoid

  • The generator checks input syntax and direct lookup-causing terms, but does not recursively resolve includes. A generated value can still exceed SPF’s evaluation limits or refer to a broken dependency after publication.
  • Do not create a separate SPF record for each vendor or automatically authorize all MX hosts. Keep one reviewed policy, use only necessary sources and remove retired senders after confirming they are no longer used.

Protocol referenceRFC 7208

Inventory actual senders before building a policy

List office mail, notifications, marketing services and self-hosted infrastructure. Enter outgoing IPv4/IPv6 addresses or CIDR ranges; enter only provider domains in include, without the include: prefix or a complete SPF string. Separate values with spaces, newlines or commas. Enable mx only when incoming-mail hosts also send for this domain.

Read your results

What the key fields tell you

ip4 and ip6 authorize address ranges; include refers to another policy. The final all mechanism controls unmatched senders.

ip4 / ip6

ip4 and ip6 authorize addresses or CIDR ranges. Use your actual outgoing infrastructure, not an address copied from an illustrative record.

include / mx

include references another SPF policy. Authorize mx only if those incoming-mail hosts also send your mail; the generator does not expand nested dependencies.

~all / -all / ?all

The final all qualifier controls unmatched sources. Review your sender inventory before selecting -all; a valid draft does not prove that every sender is included.

Review the generated policy

v=spf1 and authorized sources

The version tag is followed by your ip4, ip6, include and optional mx terms. Successful generation confirms the form’s checks, not a complete sender inventory or ownership. Compare current provider settings and remove retired sources.

~all: softfail for unmatched sources

This expresses a weaker assertion that unmatched sources are probably unauthorized. It does not guarantee acceptance or a spam-folder decision. Check real messages and provider logs for legitimate sources missing from the inventory.

-all: fail for unmatched sources

This asserts that unmatched sources are unauthorized. Account for infrequent billing, support and notification systems before publishing. The generator does not reject mail; the receiving server decides how to handle a fail result.

?all: neutral for unmatched sources

This makes no assertion about whether unmatched sources are authorized; it is not pass. This form offers ~all, -all and ?all, not +all. Choose deliberately rather than treating an illustrative policy as a production recommendation.

What to do next

When to use this tool

Draft an SPF TXT policy from known sending IPs, provider include domains and optional MX authorization.

Continue your investigation

Publish one TXT policy at the relevant sending domain. Many DNS panels use @ for the zone root. After publication, use the SPF checker to review the resolved record and lookup budget.

Four checks from draft to published record

Review existing DNS first

Use the SPF checker for the actual sending domain. Merge required sources with the existing policy rather than publishing a separate v=spf1 record for each provider. Preserve services that still send mail.

Publish TXT at the correct name

Create or update a TXT record with the full generated value. Root zones often use @; sending subdomains need their corresponding name. Do not publish under _dmarc or use the obsolete SPF record type. Publication is manual.

Check resolved content and dependencies

After relevant caches update, query the published TXT and confirm one complete SPF policy. Includes can reference other policies, so review recursive dependencies and lookup limits instead of counting only form entries.

Test new messages and maintain the inventory

Send a new test from each legitimate service and inspect trusted recipient-side results alongside DKIM and DMARC alignment. Revisit the policy when services change; old messages cannot confirm a newly published policy.

What this tool cannot tell you

No discovery or automatic publication

The generator does not inspect accounts, discover missing senders, read existing DNS or change provider settings. Supply the inventory and publish it yourself; a successful button click is not a DNS update.

No recursive lookup guarantee

The form caps direct includes plus optional mx at ten terms but does not expand dependencies. Nested policies and MX evaluation have additional SPF constraints. Check the published policy before relying on it.

No message-specific authentication

Without a real sending IP and SMTP identity, it cannot evaluate a particular message. Forwarding can change the connecting source. SPF checks envelope or HELO identities rather than independently authenticating visible From.

No mailbox or inbox guarantee

SPF does not verify recipient existence, DKIM signatures or DMARC alignment on its own. Content, reputation and receiver decisions still affect delivery; the draft is not a complete safety or delivery assessment.

Frequently asked questions

Does generating a record update DNS or guarantee the lookup limit?

No. You publish it yourself. The generator validates inputs but does not resolve nested includes, so the published policy still needs a DNS-based check.

Should I enter IP addresses or include domains?

Use actual IPs or CIDR for infrastructure you manage and provider-supplied include domains for third-party services. Do not enter a website URL, mailbox, include: prefix or full SPF policy. Separate values with whitespace or commas.

Can I publish more than one SPF record?

Do not publish multiple v=spf1 records at the same DNS name; receivers do not merge them. Combine necessary mechanisms into one policy. TXT records for other purposes can coexist and should not be deleted accidentally.

Why can I generate with no sending sources?

The form permits a version tag followed only by the all qualifier. With no earlier authorized match, every source reaches that final result. Use this only with a deliberate purpose, not as a default for an active sending domain.

Does a root policy automatically cover subdomains?

No. SPF is looked up for the identity domain actually used. Publish at the name required by your mail service. @ generally represents the current DNS zone root and is not part of the TXT value.

Why is my input rejected?

Check IP syntax, CIDR prefix, bare include domains and the ten direct-term cap including mx. This is not an arbitrary SPF editor: a, redirect and complete records cannot be pasted into these fields.

Is the draft saved or updated automatically?

Generation runs in the browser without submitting to a generation API or modifying DNS. Copy it or download email-tools.txt. Editing clears the previous result; generate again and revisit provider settings when they change.

Where are SPF syntax and limits defined?

RFC 7208 specifies mechanisms, qualifiers and evaluation limits. This page drafts supported parameters; referencing the standard does not mean every mechanism or live authentication check is implemented.