Startup India · DPIITNVIDIA Inception

Free tool

SPF Record Checker & Generator

Check any domain's SPF record in seconds, or build a new one with the free SPF record generator. We count every DNS lookup against the 10-lookup limit, flag syntax problems, and test DKIM, DMARC and MX at the same time.

Checks SPF, DKIM, DMARC and MX records live. Free, no sign-up.

Basics

What is an SPF record?

SPF (Sender Policy Framework) is a DNS TXT record that lists the servers allowed to send email for your domain. Receiving mail servers look it up on every message.

  1. Step 1

    You send an email

    Your mailbox provider's server connects to the recipient.

  2. Step 2

    Receiver looks up SPF

    It fetches the TXT record that starts with v=spf1 on your domain.

  3. Step 3

    IP is compared

    The sending IP is matched against your includes, ip4, a and mx entries.

  4. Step 4

    Pass or fail

    A match passes. No match falls through to your ~all or -all rule.

  5. Step 5

    DMARC decides

    The result feeds DMARC, which decides between inbox, spam and reject.

DNS lookups allowed per SPF check
10
SPF record allowed per domain
1
characters per TXT string (longer records are split)
255
daily emails to Gmail that make SPF + DKIM + DMARC mandatory
5,000+

Free generator

SPF record generator

Tick every service that sends email for your domain, add any of your own server IPs, and copy the record. Publish it as one TXT record at the root of your domain.

Who sends email for your domain?

Add this TXT record

Type
TXT
Host / Name
@
Value
v=spf1 include:_spf.google.com ~all
SPF DNS lookups1 / 10

Publish one SPF record per domain. If you already have one, merge the includes into it.

Already have an SPF record? Don't publish the generated one next to it. Add the new include to your existing record instead, as shown in how to merge multiple SPF records below.

Syntax

SPF record format and syntax, mechanism by mechanism

An SPF record is read left to right. The first mechanism that matches the sending IP decides the result.

MechanismExampleWhat it doesCosts a lookup?
v=spf1v=spf1Version tag. Must come first.No
includeinclude:_spf.google.comAuthorizes everything another domain's SPF authorizes.Yes, plus its nested lookups
aaAuthorizes the IPs in your domain's A record.Yes
mxmxAuthorizes the servers in your MX records.Yes
ip4 / ip6ip4:203.0.113.10Authorizes a single IP or range.No
existsexists:%{i}.spf.example.comAdvanced macro-based check.Yes
redirectredirect=_spf.example.comUses another domain's SPF record instead.Yes
ptrptrReverse-DNS match. Deprecated; avoid it.Yes
all~allCatch-all for every sender not matched above.No

Qualifiers

Each mechanism can be prefixed with a qualifier: + pass (the default), - fail, ~ soft fail and ? neutral. In practice you only set a qualifier on all. Never publish +all: it lets every server on the internet send as your domain.

QualifierResultWhat receivers doTypical use
+PassAccept: the sender is authorized.Implied on every mechanism without a qualifier
-FailTreat as unauthorized; may reject.-all
~SoftFailAccept but treat as suspicious.~all
?NeutralNo opinion either way.Avoid; it protects nothing

How to format an SPF record

  • Publish it as a TXT record. The old dedicated SPF record type is obsolete.
  • Start with v=spf1, then list mechanisms separated by single spaces: ip4/ip6 and include terms are the usual ones.
  • End with ~all or -all. Anything after all is never evaluated.
  • Publish one record per host name. Use host @ for the root domain; a subdomain you send from needs its own record, because SPF isn't inherited.
  • Longer than 255 characters? Split the value into several quoted strings inside the same record. Receivers join them back together without spaces.

Copy & paste

SPF records for Google Workspace and Microsoft 365

Use the record for the provider that hosts your mailboxes. Outreach tools that connect to your Google or Microsoft mailbox send through that provider, so they don't need their own include.

Google Workspace

v=spf1 include:_spf.google.com ~all

Microsoft 365

v=spf1 include:spf.protection.outlook.com -all

Google Workspace + a transactional provider (example: SendGrid)

v=spf1 include:_spf.google.com include:sendgrid.net ~all

Adding a second sender? Edit the record, don't add another one.

Publishing a new v=spf1 record next to the old one creates two SPF records, which breaks SPF for every message. Add the new include to the existing record instead.

Multiple senders

Multiple SPF records: how to add more than one sender

A domain can only have one SPF record, but that record can authorize as many services as you need. Adding multiple SPF records really means merging them into one.

Before: two records (SPF fails with permerror)

v=spf1 include:_spf.google.com ~all
v=spf1 include:sendgrid.net ~all

After: one merged record

v=spf1 include:_spf.google.com include:sendgrid.net ~all

How to merge SPF records

  1. Find every TXT record on the domain that starts with v=spf1. The checker at the top of this page lists them.
  2. Keep a single v=spf1 at the start of one record.
  3. Copy every include, ip4, ip6, a and mx term from the other records into it, and drop duplicates.
  4. Keep one all rule at the end: ~all unless you're sure every legitimate sender is listed.
  5. Delete the other SPF records, then re-run the checker and confirm you're at 10 DNS lookups or fewer.

Too many senders for 10 lookups?

Move a bulk or marketing tool to a subdomain, such as mail.yourdomain.com, with its own SPF record. Each host name gets its own record and its own 10-lookup budget.

Troubleshooting

Common SPF errors and how to fix them

What the checker saysWhat it meansHow to fix it
No SPF record foundReceivers can't verify your senders, and Gmail and Yahoo may reject or junk your mail.Publish one TXT record at your root domain using the template for your provider.
Multiple SPF recordsSPF returns permerror, which counts as a failure.Merge all includes into one v=spf1 record and delete the rest.
Over 10 DNS lookupsSPF returns permerror even for allowed servers.Remove unused includes, replace a/mx with ip4 where the IPs are stable, or move bulk tools to a subdomain.
Ends in +all or ?allAnyone can send as your domain.End the record with ~all or -all.
No 'all' mechanismUnmatched senders get a neutral result.Add ~all at the end of the record.

“No SPF record found” right after you added one?

  • Check the host field. Most DNS providers want @ or a blank host; typing the full domain can create yourdomain.com.yourdomain.com.
  • Check the record type is TXT and the value starts with v=spf1, with no extra characters before it.
  • Make sure you checked the domain you actually send from, not a different subdomain.
  • Wait for the old record's TTL to expire, then check again.

SPF is only one of the three records receivers check. Run your domain through the DMARC checker next, or read the full email deliverability guide.

The full picture

SPF vs DKIM vs DMARC

RecordWhat it provesWhere it livesRequired for bulk senders?
SPFThe sending server is allowed to send for the domain.yourdomain.com TXTYes (Gmail, Yahoo, Outlook.com)
DKIMThe message was signed by the domain and not altered.selector._domainkey TXTYes (Gmail, Yahoo, Outlook.com)
DMARCSPF or DKIM aligns with the visible From domain, plus the policy for failures._dmarc TXTYes, p=none at minimum

Don't want to touch DNS at all?

Jetmail creates your mailboxes and publishes SPF, DKIM and DMARC for every domain automatically. See how it works.

Get your DNS fix list

Tell us where to send it. We'll reply with mailbox, domain and DNS recommendations for your sending volume — or start right away and have mailboxes live in minutes.

Where should we send it?

Or see pricing →

Frequently asked questions

How do I check my SPF record?

Enter your domain in the checker above. It reads your live TXT records, validates the SPF syntax and counts every DNS lookup. From a terminal you can also run "dig TXT yourdomain.com +short" or "nslookup -type=txt yourdomain.com" and look for the line starting with v=spf1.

Can a domain have two SPF records?

No. A domain must publish exactly one TXT record that starts with v=spf1. Two records make SPF return a permanent error (permerror), which counts as a failure. Merge all your includes into a single record.

How do I add multiple SPF records for different senders?

Put them all in one record. Start with v=spf1, add an include (or ip4) for each service, and end with one all rule, for example: v=spf1 include:_spf.google.com include:sendgrid.net ~all. Then delete any other v=spf1 record on the domain.

What does "no SPF record found" mean?

No TXT record starting with v=spf1 exists on the exact domain that was checked. Either it was never published, it was added to the wrong host (for example yourdomain.com.yourdomain.com), it was added as the wrong record type, or DNS hasn't updated yet. Publish one TXT record at host @ and check again.

What is the correct SPF record format?

One TXT record at your domain, starting with v=spf1, followed by space-separated mechanisms (include, ip4, ip6, a, mx) and ending with an all rule such as ~all or -all. Example: v=spf1 include:_spf.google.com ~all.

What is the SPF 10 DNS lookup limit?

RFC 7208 limits SPF evaluation to 10 DNS lookups. Every include, a, mx, ptr, exists and redirect counts, including the ones nested inside the records you include. Go over 10 and SPF fails with a permerror, even if the sending server is allowed.

Should I use ~all or -all?

~all (soft fail) marks unlisted senders as suspicious; -all (hard fail) tells receivers to reject them. Once DMARC is in place, DMARC decides what happens to failing mail, so ~all is a safe default. Use -all when you are sure every legitimate sender is listed.

How long does an SPF change take to work?

As long as your DNS record's TTL. Most providers use a TTL between a few minutes and one hour, so changes usually show up quickly, but some resolvers can cache old values for up to 48 hours.

Does SPF alone stop people spoofing my domain?

No. SPF checks the envelope sender (Return-Path), not the From address people see. DMARC is what ties SPF and DKIM results to the visible From domain and tells receivers to block spoofed mail.

Before you go

Get your DNS fix list

Tell us where to send it. We'll reply with mailbox, domain and DNS recommendations for your sending volume.

We only use your email to reply to this request.