mydnsreport.com
Free DNS Tools

SPF Generator

Build a correct SPF record for your mail providers — free, in your browser.

SPF Generator

An SPF record is a list of everyone allowed to send mail for your domain — your mail provider, your website, your CRM. Get the list wrong and real mail goes to spam; include too many providers and SPF breaks entirely. Tick your providers below, add any extra servers, and the record builds itself live, with a running count of DNS lookups so you can see the 10-lookup limit before your recipients hit it.

How to add it: in your DNS provider, create a TXT record at the domain root (host @ or blank, depending on the provider) and paste the record above as the value. If a TXT record with SPF already exists, replace it — a domain must have exactly one SPF record.

Which providers should you tick?

Tick every service that sends email using your domain — not just your inbox provider. That includes your website's contact forms, your CRM, your invoicing tool, your newsletter service, and any transactional mail provider. The most common SPF failure is forgetting one: the forgotten sender's mail starts failing SPF the day you switch to -all, and the failure looks like a spam problem, not an SPF problem.

If you are not sure what sends as your domain, publish the record with ~all first, then check your DMARC reports for a week: they list every sending source and whether it passed. Add the missing ones, then tighten to -all. Your DMARC rua reports are the only reliable inventory of your senders.

The 10 DNS lookup limit — count before you publish

SPF allows at most 10 DNS lookups while a receiver checks your record. Each include:, a and mx costs one lookup — and nested includes cost more, because the included record's own includes count too. Google Workspace's include, for example, pulls in several more records behind it.

This generator shows a running count as you tick providers. If you go over 10, remove providers you no longer use, or replace an include with the provider's published IP ranges (ip4:/ip6: entries cost no lookups). Over the limit, receivers stop evaluating and return a permanent error — your SPF is treated as broken even though every server in it is legitimate.

~all or -all? Choosing the ending

~all (softfail) tells receivers to accept mail from unlisted servers but treat it as suspicious. It is the right ending while you are setting up, or whenever you are not completely sure the list is complete. -all (fail) tells receivers to reject mail from unlisted servers — the correct ending once everything is verified, and the only one that actually stops spoofing.

Never use +all: it authorises the whole internet and makes SPF meaningless. ?all (neutral) is barely better — receivers decide for themselves. The safe path is ~all for a week or two with DMARC reports, then -all. Check the result with the SPF checker after publishing.

Adding the record to your DNS

Open your DNS provider and create a TXT record at the domain root — the host is usually @ or blank (the provider fills in your domain). Paste the generated record as the value. If a TXT record starting with v=spf1 already exists, edit that one instead of creating a second: a domain must have exactly one SPF record, and two records make SPF fail outright.

Then verify it with the SPF checker, and send a test message to a Gmail address: open “Show original” and look for spf=pass. If it says fail, the sending server is not in your record — add it and test again.

Frequently asked questions

How do I create an SPF record?

Tick your mail providers in the form above, add any extra servers, and copy the generated record. Then add it as a TXT record at your domain root in your DNS provider. Verify it with the SPF checker afterwards.

What is the SPF 10 lookup limit?

SPF allows at most 10 DNS lookups per check. Each include, a and mx counts as one, and nested includes count too. Over the limit, receivers return a permanent error and treat SPF as broken.

Should I use ~all or -all?

Start with ~all (softfail) while you confirm every legitimate sender is listed. Move to -all (fail) once DMARC reports show nothing legitimate failing. Never use +all — it authorises everyone.

Can I have two SPF records?

No. A domain must have exactly one SPF record. Two records make SPF fail. Merge all mechanisms into one record and delete the extras.

Which providers do I need to include?

Every service that sends mail as your domain: your inbox provider, website forms, CRM, invoicing, newsletters and transactional mail. DMARC reports list your real senders if you are unsure.

How long does an SPF record take to work?

The record is live as soon as resolvers pick it up — usually minutes. Cached old answers expire within the previous record's TTL, at most a day for most domains.

Is this SPF generator free?

Yes. It runs entirely in your browser — nothing is uploaded, there is no account, and there is no limit. The record it builds is yours to use anywhere.