# How to Create an SPF Record That Receivers Accept

Canonical page: https://email-deliverability-desk.vercel.app/tools/spf-generator/

You have no SPF record or a broken one and need a correctly formed v=spf1 TXT value to publish.

Tool: [SPF Generator](https://billionverify.com/spf-generator)

## What it checks

- Takes up to 5 IP addresses, IPv4 or IPv6
- Takes up to 3 include entries for sending services
- Offers ~all, -all or ?all as the ending
- Adds ip4: or ip6: prefixes to bare addresses
- Shows the TXT record name, type and value with a copy button

A good SPF record is short, lists every sender once and ends with the right qualifier. This page explains how to create an SPF record, what the generator builds for you, and how to confirm the published result.

**Key facts:**

- An SPF record is a single TXT value that starts with `v=spf1` and is published at the root of the domain (RFC 7208).
- A domain must have only one SPF record, so a new value replaces the old one instead of sitting beside it (RFC 7208).
- RFC 7208 caps evaluation at 10 DNS lookups, and every `include` costs at least one.
- Per the BillionVerify SPF Generator, the tool builds the record in the browser from up to 5 IPs, up to 3 includes and one ending.
- Per the BillionVerify SPF Generator, it does not count lookups or check that the addresses are valid.

## How to create an SPF record step by step

First, list every system that sends mail as your domain. That means your mail platform, your marketing service, your help desk and any server of your own.

Then fill in the generator:

1. Enter your domain. It only labels the result, so you can leave it blank and the name shows as `@`.
2. Add the IP addresses you control. A bare IPv4 address gets the `ip4:` prefix, and an address with colons gets `ip6:`.
3. Add each service as an include. Use the include name from that service's own setup page.
4. Pick the ending, then generate and copy the value.

A finished record looks like this:

`v=spf1 ip4:203.0.113.10 include:_spf.google.com ~all`

## Which ending should you pick?

### ~all (softfail)

Use it while you test. Receivers see a failing sender as suspicious but are not told to refuse it. The tool marks it as the setting for testing.

### -all (fail)

Use it once you are sure every sender is listed. A sender you forgot will then fail outright, so list all of them first.

### ?all (neutral)

It states no policy, so it adds little. Pick it only for a short transition.

## How to publish it without breaking anything

Add the value as a TXT record on your bare domain, with the name `@` or the domain itself. Check for an existing `v=spf1` record first. If one exists, merge the new senders into it. Two records give a permerror, and that fails SPF for every message.

Watch the lookup budget as you add services. The generator allows three includes, but each include can pull in more lookups behind it. Providers that nest several includes can use the whole allowance alone.

Many DNS panels trim or split long TXT values. After you save, read the record back.

## How to verify the published record

Wait for the change to propagate, then run the new domain through an SPF checker. Confirm that the record matches what you generated and that the lookup count is 10 or lower. Then send a test message and read the authentication results in its headers.

If SPF passes but bounces stay high, the record is not the cause. Bad addresses bounce no matter how clean your DNS is. You can [run a quick check on an email address](https://billionverify.com/email-checker) with 20 free full checks per IP every 24 hours and no sign-up.

## What to set up next

SPF covers the envelope sender only. Add DKIM signing and a DMARC policy so the visible From address is protected too. Before you send to an older list, [BillionVerify's free verifier](https://billionverify.com/email-verifier) can test one address at a time over SMTP.
