SPF record generator

Build one SPF record for every service that sends your mail, with the includes from each provider's docs and an estimate of the 10 DNS lookups. Runs in your browser.

Services that send mail as this domain

ip4:, ip6:, a, mx, include: or exists:, separated by spaces. A bare IP address gets ip4: or ip6:. You can paste an existing record to merge it.

Mail from servers not listed

Your SPF record

TypeTXT
Hostexample.com (@ at most DNS hosts)
DNS lookups0 of 10 (estimate) Count them exactly
v=spf1 ~all

Before you publish

  • ImportantSPF_MULTIPLE_RECORDS

    Publish this as the only SPF record on the host. If the domain already has a TXT record that starts with v=spf1, replace it with this one (paste the old one under Other senders to merge it). Two SPF records make SPF fail for every message.

Run the full email security check DMARC, SPF, DKIM, MX and MTA-STS in one free report.

How it works

Tick every service that sends mail as your domain and add your own servers under Other senders. The generator then builds one SPF record and updates it as you type. Nothing is looked up and nothing leaves your browser.

  • Services. Each service on the list carries the include from its own documentation, with the page and the date we read it noted in our source code. Where we have a provider guide for the service, the include is the one the guide documents. A service whose docs ask for no include adds nothing and tells you why.
  • Your own senders. Type ip4:, ip6:, a, mx, include: or exists: terms, separated by spaces. A bare IP address gets ip4: or ip6: in front of it. Pasting an existing record works too: v=spf1 and its all term are dropped and the rest is merged. Anything the record could not use, such as a macro or redirect=, is refused with a message instead of being published.
  • Order. IP ranges come first, then a, mx and the includes, so receivers can often match without any DNS lookup.
  • The ending. You choose how receivers treat mail from servers not listed: ~all, -all, ?all or +all.

The warnings follow the engine that runs the full check. Every record the generator can build is parsed by the same SPF parser as the SPF record parser in our tests, so +all, ?all and ptr give the same finding codes here as there. The lookup estimate adds the counted cost of each include; above 10 the record would fail with a permanent error. A record longer than 255 characters is shown split into strings, because one TXT string holds at most 255.

Common mistakes

  • Two SPF records. Every service tells you to add its record. Merge them into one instead.
  • Counting includes instead of lookups. The limit is 10 DNS lookups for the whole tree, nested includes counted. One include can cost five.
  • Includes on the wrong name. A service with its own Return-Path subdomain gains nothing from an include on your root domain.
  • A domain that sends no mail. It needs more than v=spf1 -all: add a null MX and DMARC reject with the lockdown tool.

Frequently asked questions

Where do I publish the SPF record?

As a TXT record on the domain mail is sent from, so on example.com itself (@ at most DNS hosts). SPF is checked on the envelope sender (Return-Path), so a service that uses its own bounce subdomain, such as Amazon SES with a custom MAIL FROM domain, needs its include on that subdomain instead. For Amazon SES, Mailgun, SendGrid and Resend the generator leaves the include out of this record and shows a separate record for the subdomain.

I already have an SPF record. Should I add a second one?

No. A name may hold only one TXT record that starts with v=spf1. With two, receivers return a permanent error and SPF fails for all your mail (SPF_MULTIPLE_RECORDS). Paste your current record under Other senders: the generator merges its terms with the services you pick, and you replace the old record with the new one.

Should the record end in ~all or -all?

We suggest ~all (softfail). RFC 9989 warns that some receivers check SPF early in the SMTP transaction, so -all can get mail rejected before DMARC runs, even when aligned DKIM would have passed it. With DMARC at p=quarantine or p=reject, DMARC decides what happens to forged mail. Never use +all, which lets any server send as your domain, and avoid ?all, which says nothing.

How exact is the lookup count?

It is an estimate. For each service we counted the DNS lookups behind its include with real DNS on the date in our source notes, and your own includes count as 1 each. Services change their records, so once the record is live, run the SPF lookup counter: it walks the whole include tree and gives the exact number against the limit of 10.

Why do some services add no include?

Because their docs ask for none. Postmark, Mailchimp, Klaviyo, Shopify and Customer.io send with their own Return-Path domain or set up SPF through CNAME or NS records, so SPF on your domain does not cover their mail and an include would only cost lookups. HubSpot and Brevo show an account-specific value in their app; paste that under Other senders.

Is anything sent to Lookproof?

No. The generator runs only in your browser. Nothing you type leaves the page, and there is no account. To check the record once it is published, run the email security check.