The message “SPF PermError: too many DNS lookups” often appears out of the blue – usually after a new service such as a newsletter tool or a ticket system was added to the SPF record. The cause is almost always the same: your SPF record triggers too many DNS lookups. Here is how to count the lookups correctly and solve the problem for good.
For every incoming email, the receiving server looks up your SPF record. To keep this check from triggering an unlimited number of further lookups and slowing servers down, the SPF standard RFC 7208 sets an upper limit: at most ten mechanisms may trigger a DNS lookup. If the limit is exceeded, the receiver aborts with “PermError” – as if you had no valid SPF record at all.
You often notice the consequences only later: emails land in spam, DMARC fails unless a DKIM signature saves the message, and your DMARC reports suddenly show many failures.
include:, a, mx, ptr, exists: and redirect=.include: of a large provider may contain further references and use up several lookups at once.ip4:, ip6: and all – they are evaluated directly.Counting by hand is tedious. The free DNS magnifier shows for every SPF record right away how many of the ten allowed lookups it uses.
Good to know: there may only be one SPF record per domain. Two TXT records starting with v=spf1 also lead to a PermError – regardless of the number of DNS lookups.
1. Remove old services. Check every include:: do you still use the service? Former newsletter tools, web shops or phone systems often stay in the record for years. Your DMARC reports show which services actually send in your name.
2. Replace a and mx. If your own server sends from a fixed IP address, enter it directly with ip4: or ip6:. That saves lookups.
3. Drop ptr. The mechanism is considered outdated, is slow and is ignored by many receivers anyway.
4. Move services to subdomains. Send newsletters via news.your-domain.com, for example. The subdomain gets its own SPF record with its own ten lookups – and your main record is relieved.
5. Remove duplicate references. If the same provider appears twice in the record, it counts twice.
If cleaning up is not enough, SPF flattening helps: instead of referring to the providers’ records, their IP addresses are entered directly. This no longer uses lookups – but there is a catch: if a provider such as Microsoft changes its servers, your record is outdated and emails suddenly fail. Manual flattening therefore needs constant checking.
With hosted SPF from Mailsecurity24 we take care of exactly that: you only enter one short reference, we combine all services, compare the addresses every hour and stay permanently below the limit. In case of disruptions the last working state always remains in place.
After every change a quick look is worth it: the DNS magnifier shows the new number of lookups and whether the changed record has already arrived at Google and Cloudflare. With the domain check below you also check DMARC, DKIM and the other records of your domain. You will find more basics in the guide Check and set up your SPF record.
Free check · no sign-up
Check in seconds whether your domain is protected against email spoofing – or whether an email really comes from the stated sender.
Send any email to a one-time address – we show in seconds whether SPF, DKIM and DMARC passed. With a report and stamp.
Send any email from the address you want to check to:
At most ten – including all lookups in included records. In addition, at most two lookups may come back empty.
No. IP addresses are evaluated directly and do not use a lookup. That is why it helps to enter fixed servers with ip4 or ip6.
The receiver aborts the check with PermError. SPF then counts as failed; without a valid DKIM signature DMARC fails as well, and emails land in spam or are rejected.
Yes, as long as the entered addresses are kept up to date. Manually entered addresses become outdated as soon as a provider changes its servers. An automatically maintained, hosted SPF avoids that.
Try Mailsecurity24 free for 14 days. No payment details required.
