SPF is a TXT record that lists which servers may send mail for your domain. A PermError (permanent error) means the problem is in the record, not in the message: every receiver will hit the same error until you change DNS. You’ll see it as spf=permerror in message headers, or as “PermError” in online SPF checkers.
Causes
- Two or more SPF records on the same name, for example cPanel’s record plus another added for Google Workspace or a newsletter tool.
- More than 10 DNS lookups. Every
include:adds its own lookups, and big providers already use several. - Syntax errors: a typo in
v=spf1, an invalidip4:address, an unknown word, twoallterms, or broken quotes. - An
include:that points to a domain without an SPF record, often a service you stopped using. - More than two “void” lookups, meaning names in the record that return no DNS answer.
How to fix it
-
List the current records. Use the TXT lookup tool or a terminal:
dig +short TXT example.com | grep spf1 -
If you see more than one
v=spf1line, merge them. Keep one record and combine every server and include into it. For example, cPanel’s default plus Google Workspace becomes:v=spf1 +a +mx +ip4:203.0.113.10 include:_spf.google.com ~allDelete the other record. The SPF generator builds a correct record from a list of services.
-
Count the lookups. Add one for each
a,mx,include,existsandredirect, then open each include and count what’s inside. If the total is above 10:- remove services you no longer send through;
- replace
aandmxwith anip4:entry when they resolve to the same server; - as a last resort, replace an include with the provider’s IP ranges (“flattening”), knowing that you’ll have to update them when the provider changes its IPs.
-
Check the syntax. One
v=spf1at the start, oneallat the end (~allor-all), and spaces between terms. Every TXT record value must be inside one pair of quotes. -
Wait for the TTL to pass, then send a test to a Gmail address, open Show original and look for
spf=pass.
Why it matters
A PermError doesn’t always send mail straight to spam, but it removes one of the two ways your mail can pass DMARC. If DKIM also has a problem, you get a DMARC fail and, with a strict policy, outright rejections such as Gmail’s 550 5.7.26.
Prevention
- Before adding a new sending service, edit the existing SPF record instead of creating a new one.
- Remove includes when you cancel a service.
- Recheck the record after any DNS change, and follow the full SPF, DKIM and DMARC setup guide.
On ArabyHost
For domains on ns1.arabicode.com and ns2.arabicode.com, ArabyHost creates a valid SPF record automatically. When you add another service that sends mail for you, edit that same record in the DNS editor and add the service’s include: there; don’t create a second one. cPanel → Email Deliverability shows whether the record is valid and can repair it if it isn’t.
FAQ
Can I have two SPF records if I use two email services?
No. A domain must have exactly one TXT record starting with `v=spf1`. Put both services in that one record, for example with two `include:` entries.
Which parts of SPF count toward the 10-lookup limit?
`include`, `a`, `mx`, `ptr`, `exists` and `redirect` each count, including lookups inside nested includes. `ip4`, `ip6` and `all` don't count.
Is SPF PermError the same as SPF fail?
Not exactly. Fail means the sending server isn't listed; PermError means the record itself is broken. For DMARC both are treated as SPF not passing.