● 100% free · no sign-up

Inboxlogy Free Tools

SPF Record Generator

Tick the services that send your email and get a correct SPF record instantly — with a running count of the 10-lookup limit so you never break it.

Tick all that apply — we build a valid SPF record with the right includes.

How it works

  1. Pick your sending services

    Tick every service that sends mail using your domain: mailbox provider, sequencer, transactional platform, CRM, helpdesk. Anything reaching a recipient with your domain in the return-path has to be listed, or that mail fails SPF.

  2. Watch the lookup counter

    Each service shows its true recursive cost. Google Workspace counts four, Microsoft 365 counts one, most ESPs one or two. The counter warns you before the total crosses 10, where SPF turns into a permanent error.

  3. Publish the TXT record

    Copy the generated string into a TXT record at your domain root, with the host set to @ or the domain itself. Keep exactly one SPF record. Use ~all while you verify, then tighten to -all once nothing legitimate is missing.

What goes into a correct SPF record

An SPF record is one TXT record that starts with v=spf1 and ends with an all mechanism. Between them you list sources. ip4 and ip6 name addresses or CIDR ranges and cost no DNS lookups. a and mx authorize whatever your A and MX records point to. include delegates to another domain's SPF record, which is how providers publish their own ranges. Evaluation stops at the first match, so the all mechanism always goes last.

The cheap mechanisms are the ones to prefer. If you send from IPs you control, ip4 entries keep your lookup count at zero and never break when a provider renumbers. Includes are convenient but recursive: _spf.google.com expands to three further includes, so Google Workspace costs four of your ten before you add anything else. Mailboxes on dedicated IPs, such as the ones Inboxlogy provisions, can be authorized with a single ip4 range instead of an include.

Common mistakes

Listing services you no longer use

Every stale include costs a DNS lookup and widens who may send as you. When you cancel a platform, strip its include the same day. Leftover entries are a common reason a domain sits one or two lookups over the limit for no benefit.

Adding a second SPF record

Providers tell you to add their TXT record, which leads people to publish two v=spf1 records on the same name. That is a permerror and both are ignored. Merge the new include into your existing record and keep exactly one.

Wrapping the record in quotes

Some DNS panels add the surrounding quotes for you. Pasting your own leaves literal quote characters inside the value, and the record fails to parse. Check the saved record with a lookup tool afterward rather than trusting the editor field.

Ignoring the 255-character limit

A single TXT string caps at 255 characters. Longer SPF records must be split into multiple quoted strings within the same record, which resolvers concatenate. Panels that silently truncate instead leave an invalid record, so verify length after editing a long flattened record.

Frequently asked questions

Do I need a separate SPF record for each subdomain that sends mail?

Yes. SPF is evaluated against the exact domain in MAIL FROM, and there is no inheritance. If your sequencer uses bounce.example.com as the return-path, that name needs its own TXT record. Wildcards are unreliable here, because a wildcard only answers names that have no other records. Publish explicit SPF records for every name that sends.

How many includes can I safely put in an SPF record?

Fewer than you would expect, because includes nest. The limit is 10 DNS-querying mechanisms counted recursively, not 10 include statements. Google Workspace alone consumes four. Three or four providers often hits the ceiling. Count the real expansion, and convert your own sending IPs to ip4 entries to free up room for the providers you cannot flatten.

Should I use a, mx, or ip4 in my SPF record?

Use ip4 when you know the addresses. The a and mx mechanisms each cost a DNS lookup and authorize whatever those records happen to point to today, which can quietly include a shared web host. ip4 costs nothing against the limit and is explicit. Keep a and mx only if mail genuinely leaves the hosts they name.

What does v=spf1 mean?

It is the version tag that marks a TXT record as SPF. Receivers scan a domain's TXT records and only evaluate ones beginning with exactly v=spf1; anything else is ignored. That is why a typo like v=spf-1 makes the record invisible rather than broken. The old dedicated SPF record type, DNS type 99, is deprecated and should not be used.

Can one SPF record cover both sending and receiving?

SPF only covers sending. It tells receivers which hosts may send mail using your domain. Inbound mail is controlled by your MX records, which are completely separate. Changing SPF has no effect on whether you receive mail, and changing MX has no effect on whether your outbound campaigns authenticate. You need both configured correctly.