How-To

How to create an SPF record that passes and stays under 10 lookups

Inboxlogy6 min readUpdated 2026-10-26

In short: To create an SPF record, list every service that sends mail for you, combine them into one v=spf1 record with include: statements, and end with ~all or -all. A free SPF Generator builds this for you and keeps you under the 10-lookup limit that silently breaks SPF.

Before you build: list your senders

Your SPF record must name every service that sends email as your domain. Make a list first: your mailbox provider (Google Workspace, Microsoft 365), any cold email or marketing tools, your CRM, transactional senders, and your own mail server if you run one. Missing one means its mail fails SPF. Including extras you do not use wastes precious DNS lookups.

How to create your SPF record step by step

  1. Open the SPF Generator. Go to the free Inboxlogy SPF Generator.
  2. Add each sender. Pick your providers or paste their include: values. The tool merges them into one record.
  3. Choose your policy. Select ~all (soft fail) while testing, or -all (hard fail) once every sender is listed.
  4. Copy the record. The generator outputs a single, valid v=spf1 line.
  5. Publish it in DNS. Add it as a TXT record on your root domain, replacing any existing SPF record.

Staying under the 10-lookup limit

SPF allows only 10 DNS lookups. Each include:, a, mx and redirect counts, and some includes expand into several lookups. Keep the list tight: remove tools you no longer use, avoid duplicate includes, and if you genuinely need many senders, look into SPF flattening. After publishing, confirm your count with the SPF Checker.

After you publish

SPF is one of three records. Pair it with a published DKIM key and a DMARC record so your mail authenticates fully. Then verify everything with the matching checkers before you start sending.

Build a valid SPF record free

Combine your senders into one correct record, pick your policy, and stay under the 10-lookup limit.

Open the SPF Generator →All free tools

Frequently asked questions

Can I merge two SPF records into one?
Yes, and you must. A domain can only have one SPF record. Combine all your include: statements into a single v=spf1 line. An SPF Generator does this automatically.
Should I use ~all or -all in a new record?
Start with ~all (soft fail) so legitimate mail is not rejected while you confirm every sender is listed. Move to -all (hard fail) once you are confident the record is complete.
How do I avoid going over 10 lookups?
Only include services you actually use, avoid duplicate includes, and consider SPF flattening if you truly need many senders. Check your count with an SPF Checker after publishing.
Where do I publish the SPF record?
As a TXT record on your root domain in your DNS provider. There should be exactly one SPF TXT record, so replace any existing one rather than adding a second.