SPF record generator

Build an SPF record from the IP ranges, includes, and A/MX records that send mail for your domain, with a live lookup count against the limit of 10.

Runs in your browser ยท nothing is sentEmail securityNew

Build an SPF record from the servers that send mail for your domain. SPF allows at most 10 lookups: includes, a and mx records count towards that.

Senders
  • ip4

Generated record

v=spf1 -all

DNS lookups used: 0 of 10

Publish this as a TXT record on your domain (not a subdomain). Most DNS providers let you paste it directly.

Check this record โ†’

How to use

  1. Add each sender: an IP range, an include for your mail provider, or your own mail server.
  2. Choose the ending (-all is recommended once the list is complete).
  3. Copy the record and publish it as a TXT record on your domain.

Common scenarios

Adding a new marketing email tool

Add the include your provider documents, then check the lookup count has not passed 10.

Checking the result

Paste the generated record into the SPF analyzer to see it validated the same way receivers will check it.

SPF analyzer โ†’

About this tool

Add the servers that are allowed to send mail for your domain: IPv4 or IPv6 ranges, includes for a mail provider, or your own A/MX records. The tool builds a valid SPF record and keeps count of the DNS lookups it causes, since SPF allows at most 10. Finish with the right ending: reject (-all) once the list is complete.

๐Ÿ”’ Your input stays in your browser and is never sent anywhere.

Frequently asked questions

What should I add first?

Start with your actual mail provider, usually as an include (for example include:_spf.google.com for Google Workspace, or the range your provider documents). Add your own servers as ip4/ip6 ranges.

Why does the lookup count matter?

Every include, and every a or mx without an IP, costs one DNS lookup when SPF is checked. Above 10 lookups, receivers treat SPF as a permanent error and spam filtering using SPF stops working for your domain.

Where do I publish this record?

As a TXT record on your domain itself (not a subdomain, and not prefixed with anything). Most DNS providers let you paste the generated record directly.

Found a problem or have a suggestion? Tell us