Skip to content

Free tool

SPF record generator

Pick the services that send mail as your domain, add your own servers, and copy one SPF record with its DNS lookup count. Free, no signup.

SPF record options

Services that send mail as your domain
Your own servers

One per line. Commas and spaces also work.

The domain a service asks you to include, such as _spf.example.net.

Mail from servers not listed

Your SPF record

Name (TXT record)

@

Value

v=spf1 ~all

DNS lookups in this record: 0 of 10. Each include can add lookups of its own. After you publish, count them all with the free SPF checker.

  • No senders listed

    This record authorizes no server, so every message fails SPF. Use "v=spf1 -all" only on a domain that never sends mail.

    Warning

Published your record? Check it, including every nested include, with the free SPF checker

One record for every sender

A domain can publish only one SPF record, and every service that sends mail as your domain has to be in it: your mailbox provider, your newsletter tool, your billing system. Receivers treat two SPF records as a permanent error, so both stop working.

Publish the generated value as a TXT record on the root of your domain, shown as @ in most DNS panels. If you already have an SPF record, replace it with the new one instead of adding a second.

The 10 lookup limit

Receivers stop evaluating SPF after 10 DNS lookups and treat the record as a permanent error. include, a, mx, ptr, exists, and redirect each cost one lookup, and an include can contain more includes of its own.

The generator counts the lookups written in your record. After you publish it, run the SPF checker, which follows every include and counts the nested lookups too.

~all or -all

~all (soft fail) asks receivers to accept mail from unlisted servers but treat it with suspicion. -all (fail) asks them to reject it. Start with ~all while you confirm every sender is listed, then move to -all.

Once your DMARC policy is quarantine or reject, DMARC decides what happens to failing mail, and the difference between the two matters less.

FAQ

Questions?

Talk to a human →
Where do I publish the SPF record?

As a TXT record on the root of your domain, usually written as @ in your DNS panel. There must be only one SPF record on that name.

Can a domain have two SPF records?

No. Receivers treat two v=spf1 records as a permanent error and SPF fails for every message. Merge them into one record with all the includes and addresses.

Why is my sending service not in the list?

Some services, such as Resend, publish SPF on a subdomain they set up for you, so an include on your root record does nothing. Follow the DNS instructions in that service's dashboard, or add its include in the extra includes field if it asks for one.

Should I use ~all or -all?

Use ~all while you are still finding every service that sends as your domain. Switch to -all once your DMARC reports show all legitimate mail passing.

Does SPF stop spoofing on its own?

No. SPF checks the hidden Return-Path address, not the From address people see. DMARC ties SPF and DKIM to the visible From domain and tells receivers what to do with mail that fails.

Email, newsletters and booking pages on your own domain, in one plan.

Get started for free