Guides › Hosting, domain & email › Email problems

SPF 'PermError: Too Many DNS Lookups' and Multiple SPF Records

Your SPF record fails with a PermError. Flatten it, remove unused includes and keep only one record.

Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
Email problem

SPF tells receivers which servers may send mail for your domain. Two common mistakes make it fail.

Mistake 1: More than one SPF record

A domain may have only one TXT record that starts with v=spf1. If you added a second when you signed up for a new service, merge them into one.

Mistake 2: More than 10 DNS lookups

SPF checks may trigger at most 10 DNS lookups. Each include:, a, mx and similar mechanism counts, including those nested inside other services. Going over gives a PermError, and SPF fails.

Fix it

  1. List every service that sends mail for you: your host, newsletter tool, shop, CRM.
  2. Remove services you no longer use.
  3. Replace broad mechanisms with exact addresses where possible.
  4. Use an SPF checking tool to count lookups, and consider an SPF flattening service if you must use many.

Example shape

v=spf1 include:_spf.yourhost.example include:service.example ~all

Use the exact include values your providers publish.

After

Check SPF with DKIM and DMARC. See our spam guide.

Free tool for this problem: Email DNS Checker · SPF Record Builder

Related guides

Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.

Last updated 2026-11-21.