Guides

SPF PermError: every cause and its fix

8 November 2026

An SPF PermError means a receiver found your SPF record but could not interpret it, so SPF fails for every message, not just one. RFC 7208 defines it as published records that "could not be correctly interpreted." There are five usual causes: two SPF records on the same name, a syntax error, more than ten DNS lookups, more than two lookups that return nothing, and an include: pointing at a domain with no SPF record. Each one is a DNS fix.

Because a PermError breaks SPF for all your mail at once, it is one of the first things a $129 Snapshot checks. The sections below go cause by cause, with the RFC section for each.

Why it matters more than a soft failure

A softfail (~all) or a fail (-all) is a judgment about one message from one IP. A PermError says the record itself is broken. RFC 7208 section 2.6.7 says it signals a problem that needs the DNS operator to step in. Gmail requires SPF or DKIM from every sender, and SPF and DKIM from bulk senders, so a broken SPF record can turn into the 5.7.27 or 5.7.26 bounces described in our guide to Gmail authentication bounces.

DMARC needs either SPF or DKIM to pass and align. If every sender also signs DKIM on your domain, DMARC can still pass while SPF is broken. That is a reason to set up DKIM everywhere. It is not a reason to leave the PermError in place.

Cause 1: two SPF records

This one is easy to do by accident. It usually happens when a new service tells you to "add this SPF record" and you add a second TXT record instead of editing the first.

example.com. TXT "v=spf1 include:_spf.google.com ~all"
    example.com. TXT "v=spf1 include:servers.mcsv.net ~all"

RFC 7208 section 3.2 says a domain must not have more than one SPF record, and section 4.5 says that if more than one is found, the result is a PermError.

Fix: merge them into one record with one v=spf1 at the start and one all at the end:

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

Other TXT records on the same name, like site verification codes, are fine. Only records starting with v=spf1 count.

Cause 2: a syntax error

RFC 7208 section 4.6 says that if there are any syntax errors anywhere in the record, evaluation stops right away with a PermError. Common ones:

Fix: retype the record in plain text and compare it piece by piece with what each provider gave you. Our guide to creating an SPF record shows the syntax for each mechanism.

Cause 3: more than ten DNS lookups

RFC 7208 section 4.6.4 limits the terms that cause DNS lookups to ten. include, a, mx, ptr, exists, and redirect each count, and so does every lookup inside the records you include. Go past ten and the result is a PermError.

Fix: remove services you no longer use, replace a and mx with the IP ranges they stand for if those are stable, and consider moving a sender to a subdomain. Our guide to too many DNS lookups covers how to count and why flattening needs upkeep.

Section 4.6.4 has a related limit: each mx term must not lead to more than ten address lookups. A domain with many MX hosts can hit this on its own.

Cause 4: too many void lookups

A void lookup is a DNS query that returns no answer, or says the name does not exist. Section 4.6.4 says implementations should limit void lookups to two, and going over gives a PermError. This catches records that still include services you stopped using:

v=spf1 include:_spf.oldprovider.example include:spf.closedtool.example include:_spf.google.com ~all

If the first two domains no longer publish anything, that is two void lookups. One more and the record fails.

Fix: look up each include yourself with dig TXT. Remove any that return nothing.

Cause 5: an include with no SPF record behind it

Section 5.2 says that when an include: points at a domain that has no SPF record, the result is a PermError, not just a non-match. A provider that renamed its SPF domain, or a typo in the include, produces this.

Fix: check the provider’s current documentation for the right include value. For example, HubSpot’s setup gives each account its own include string, covered in our HubSpot guide. Copy it, do not guess it.

Not a PermError, but worth fixing

How to find which cause you have

  1. Look at every TXT record on the name: dig TXT example.com +short. Count lines that start with v=spf1. More than one is cause 1.
  2. Read the record slowly for typos and odd characters. That is cause 2.
  3. Look up each include: and redirect= target with dig TXT. A target with no v=spf1 is cause 5. A name that returns nothing at all counts toward cause 4.
  4. Count lookups through every nested include. More than ten is cause 3.

Then send a test message to a Gmail address and use Show original. The SPF line should say PASS. If it says PERMERROR, one of the causes is still there.

When a receiver rejects mail because of a PermError, RFC 7208 section 8.7 says it should use SMTP code 550 with enhanced status code 5.5.2. If you see that pair in a bounce, check SPF first.

Keeping it from coming back

Most PermErrors are not typed in on purpose. They arrive when someone adds a service in a hurry. Keep a short list of every service that sends as your domain, and when one is added or removed, edit the one SPF record and recount. Watch re-checks your records weekly for exactly this kind of drift.

Sources