How to fix an SPF record that isn't found

A TXT lookup on a domain that finds one SPF record to keep and a second SPF record crossed out

An SPF record that isn't found is almost always one of four things: DNS hasn't propagated yet, the record is on the wrong host, it's split across multiple TXT records, or you have two SPF records where only one is allowed. Check with dig TXT yourdomain.com and confirm exactly one record starts with v=spf1.

Unitpost ·

SPF (Sender Policy Framework) is a TXT record that lists the servers allowed to send mail for your domain. Receiving servers look it up on every message. When the lookup fails, your mail lands in spam or gets rejected outright.

First, check what DNS actually returns

Don't go by your DNS provider's dashboard. Query the record the way a receiving server does:

Bash
dig TXT yourdomain.com +short

# Or, if dig isn't available:
nslookup -type=TXT yourdomain.com

You want exactly one string that starts with v=spf1. If you send through Unitpost, query unitpost.yourdomain.com instead (cause 2 explains why). If you see nothing, work through the causes below in order.

Cause 1: DNS hasn't propagated

A new record takes time to become visible, depending on the zone's TTL. Most DNS providers publish within minutes, but a long TTL on a previous record can hide the change for hours.

If you just added the record, wait and query again before you change anything. Editing a record over and over while it propagates is how people end up with duplicates.

Cause 2: the record is on the wrong host

Receivers look up SPF on the envelope domain (the MAIL FROM, also called Return-Path). That isn't always the domain in the visible From address.

If you send through Unitpost, SPF is a TXT record on unitpost.yourdomain.com with the value v=spf1 include:amazonses.com ~all. There is no include:spf.unitpost.com. That hostname doesn't exist, and adding it to your apex record produces "record not found" or a permerror. Leave any apex SPF for Google Workspace or another provider as it is. If the Unitpost record lands on your root domain by mistake, the domain page says "Your SPF is on yourdomain.com. Add it at unitpost.yourdomain.com."

For SPF on a domain you send from directly, the host field is:

  • Root domain (yourdomain.com): @ or empty
  • Subdomain (mail.yourdomain.com): mail
  • Never www: mail isn't sent from there

A common mistake is typing the full domain into a field that already appends it, which produces yourdomain.com.yourdomain.com.

Cause 3: more than one SPF record

A host can have only one SPF record. Two is a permanent error, and most receivers treat it as no SPF at all instead of picking one. It usually happens when you add a new provider without merging it into the existing record.

The rule is per host name. Unitpost's record on unitpost.yourdomain.com doesn't conflict with the SPF record on your root domain.

Merge, don't add

If a record already exists, add the new include: to it. Two providers become one record: v=spf1 include:one.example include:two.example ~all

Cause 4: too many DNS lookups

Evaluating an SPF record may take at most 10 DNS lookups. Each include:, a, mx, ptr and exists: mechanism costs at least one, and the lookups inside an include count too. Go over 10 and the result is permerror, which behaves like a failure.

If includes have piled up from several providers, remove the ones you no longer send from.

Cause 5: the TXT is quoted or split wrong

Some DNS dashboards want the value in quotes ("v=spf1 …") and some strip them. If dig TXT shows the value split across two strings, or without v=spf1, the record isn't what you typed. Re-enter it as a single TXT value. Don't create a second SPF record to work around a quoting mistake.

Should the record end in ~all or -all?

~all is a softfail: mail from servers that aren't listed is accepted but marked suspicious. -all is a hardfail: receivers should reject it.

Start with ~all while you confirm every legitimate sender is listed, then move to -all. Going straight to -all is how teams end up blocking their own invoicing system.

Frequently asked questions

How long does an SPF record take to work?

Usually minutes, and up to 48 hours in the worst case. The TTL of the record you replaced sets the delay, not the TTL of the new one. Check with dig TXT yourdomain.com instead of resending test mail; it shows you what DNS returns right now.

Can I have two SPF records?

No. The spec allows exactly one TXT record starting with v=spf1 on a host. Two is a permanent error, and most receiving servers treat it as if you had no SPF record at all. Merge your senders into one record with several include: mechanisms.

Do I need SPF if I already have DKIM?

Yes, in practice. SPF lists the servers allowed to send for your domain, and DKIM signs the message itself. DMARC needs at least one of them to pass and align with the visible From domain, and the Gmail and Yahoo bulk-sender rules expect both.

Why does Gmail say SPF record not found when I added a TXT?

Receivers look up SPF on the MAIL FROM (Return-Path) host, which isn't always the From domain. If you send through Unitpost, SPF lives on unitpost.yourdomain.com with the value v=spf1 include:amazonses.com ~all. There is no include:spf.unitpost.com; that hostname doesn't exist. Query the host your DNS instructions gave you.

Send email your users actually receive

5,000 emails a month free — API, SMTP, templates, tracking. No credit card.