Free SPF Record Generator: Google & M365 | BounceZero
25+ ESPs - Lookup Counter - RFC 7208

SPF Record Generator

Select the services that send mail for your domain. We build the correct SPF record with the right include order and warn if you exceed the 10-lookup limit.

How This Generator Works

SPF records list the IP addresses and hostnames authorized to send email on behalf of your domain. Building one by hand means knowing the exact include: directive for every ESP you use, ordering them correctly, and tracking the total DNS lookup count against the RFC 7208 limit of 10. This generator does all of that automatically - pick the senders that mail for you, get the correct record.

The 10 DNS Lookup Trap

When a receiving mail server evaluates your SPF, it resolves every include:, a, mx, exists:, and redirect= mechanism via DNS. RFC 7208 caps total lookups at 10. Exceed it and receiving servers return PermError - your SPF effectively fails.

The trap: lookups compound recursively. include:_spf.google.com alone burns 3 lookups (one for the include + two more inside Google's resolved record). Add Microsoft 365 (2), SendGrid (2), Mailgun (2), and your own mx (1) and you're at 10. Add one more service and SPF breaks.

This generator counts lookups per ESP and warns you before publishing if you're over.

Why ~all vs -all Matters

Best practice: start with ~all, monitor your DMARC aggregate reports for 30 days, then upgrade to -all once you're sure no legitimate mail is being soft-failed.

Full email auth playbook

SPF is one of three records you need (SPF + DKIM + DMARC). The full guide walks through the alignment rules that make all three actually work together.

Read the SPF/DKIM/DMARC guide

Frequently Asked Questions

Why does Google Workspace take 3 SPF DNS lookups?

Google Workspace uses include:_spf.google.com, which itself references nested netblock records inside _netblocks.google.com. Selecting Google Workspace burns 3 of your 10 total RFC 7208 lookups before adding any other ESP.

What is the 10 DNS lookup limit in SPF?

RFC 7208 restricts receiving servers to at most 10 DNS-querying mechanisms (include, a, mx, ptr, exists, redirect) per SPF check. Exceeding 10 causes an immediate PermError and SPF failure across mailbox providers.

Should I end my SPF record with ~all or -all?

Start with ~all (softfail) while auditing all sending tools and reviewing DMARC aggregate reports for 30 days. Switch to -all (hard fail) once every authorized sender is confirmed in the record.

Can I publish more than one SPF record on a domain?

No. A domain must have only a single TXT record starting with v=spf1. Publishing two separate v=spf1 TXT records violates RFC 7208 and causes both records to evaluate as PermError.

More Free Tools

Free tools & checkers

Single-email checks, no signup required