SPF Record Generator

Build a valid SPF TXT record for your domain from the mail services you use, plus any IP addresses and a policy for senders not on the list. The record is checked for the 10 DNS lookup limit as you type.

1 Fill in the boxes

2 Your answer

Your answer shows here as you type.

How to use the SPF Record Generator

  1. Enter your domain and tick each service that sends mail for it.
  2. Add any extra IP addresses (ip4: or ip6:) or include: entries, separated by spaces.
  3. Choose a policy for other senders, then copy the record into a TXT record at your DNS host.

Frequently asked questions

What is an SPF record?

An SPF record is a TXT record in your domain's DNS that lists the servers and services allowed to send email for that domain. Receiving mail servers check the sending IP against it.

What is the difference between ~all and -all?

~all is a softfail, which marks mail from unlisted servers as suspicious. -all is a hard fail, which tells receivers to reject it. Many domains start with ~all and move to -all once their sender list is complete.

How many DNS lookups can an SPF record use?

An SPF check allows 10 DNS lookups. Each include, a, mx, ptr, exists, and redirect mechanism counts, and the lookups inside included records count too. Going over the limit causes a permerror.

Can a domain have more than one SPF record?

No. A domain should publish exactly one SPF TXT record. If you already have one, merge the new senders into it instead of adding a second record.

Wrote something with AI? Slop Monkey rewrites it so it sounds like you, and keeps your facts.