How to create an SPF record that passes and stays under 10 lookups
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.
On this page
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
- Open the SPF Generator. Go to the free Inboxlogy SPF Generator.
- Add each sender. Pick your providers or paste their
include:values. The tool merges them into one record. - Choose your policy. Select
~all(soft fail) while testing, or-all(hard fail) once every sender is listed. - Copy the record. The generator outputs a single, valid
v=spf1line. - 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