Site AI Auditaz Internet Solutions terméke

SPF Needs Too Many DNS Lookups: Fixing This Site AI Audit Finding

2026. november 19.8 perc olvasásE-mailek kézbesíthetősége
SPF Needs Too Many DNS Lookups: Fixing This Site AI Audit Finding

Short answer: “SPF needs N DNS lookups (limit is 10)” is a critical finding in the E-mail area of a Site AI Audit report. It appears when your domain’s SPF record, together with every record it points to, needs more than ten DNS lookups to evaluate. Above that limit, receiving servers treat SPF as broken and legitimate mail can be rejected or sent to spam. The fix is to remove senders you no longer use, replace includes with fixed addresses where you control the server, and give busy services their own subdomain.

What the finding says

The finding sits among the e-mail checks, next to “No SPF record”, “More than one SPF record” and the two findings about the “all” rule at the end of the record. Its title shows the real number, for example “SPF needs 13 DNS lookups (limit is 10)”. The explanation in the report is short: over the limit, SPF fails and legitimate mail may be rejected. The advice is to remove unused include entries or flatten the record.

It is marked critical because the damage is quiet. Nothing looks wrong when you send a message. The message leaves your mail system normally. But somewhere at the receiving end, the check that is supposed to prove that your server may send for your domain returns an error instead of a pass, and the receiver decides what to do with the message. Some will deliver it with a penalty, some will reject it. You will often learn about it only when a customer says your invoice never arrived.

Why SPF has a lookup limit

SPF is a list of senders published in DNS. To check a message, the receiving server reads your record and follows every instruction that points elsewhere. Each time it must ask DNS another question, a lookup, and each answer can contain more instructions. Without a limit, a badly written record could send the receiver on a long chain of queries, which is slow and can be abused to generate traffic. The SPF standard therefore says that evaluating one record must not need more than ten lookups. Beyond ten, the result is a permanent error, and the receiving server treats the record as unusable.

For a small domain that only uses one mail provider, the limit is never a problem. It becomes a problem as a business adds services that send mail in its name: the main mailbox provider, a newsletter tool, an invoicing system, a helpdesk, a booking tool and a CRM. Each one asks you to add its own include to the same record, and each of those includes may point to further includes of its own.

What the audit counts

The audit reads your record and counts the instructions that need a DNS question, then follows the includes to count their lookups as well, several levels deep. The terms that count are:

Terms that hold addresses directly, such as ip4 and ip6, cost nothing. Neither does the “all” term at the end. The finding appears only when the total is above ten, so a record with exactly ten is not flagged.

This is why the number often surprises people. Your own record may have only five visible includes, yet each of them is a large provider whose record contains several more. The sum is what counts, not what you can see in your own record.

How to see where the lookups go

  1. Copy your SPF record from DNS: the TXT record on the domain that starts with v=spf1.
  2. List every include, redirect, a, mx and exists term. That gives you the first level.
  3. Open each included name with a DNS lookup tool, look at its TXT record that starts with v=spf1 and note the terms inside it. Repeat for any nested includes.
  4. Add them up. Mark which service each branch belongs to.
  5. Ask for each service: is it still in use, and does it need to send as my main domain?

The guide to SPF too many DNS lookups walks through the counting method in more detail, and the article on include versus redirect explains how those two terms differ.

Fix 1: remove what you no longer use

The easiest saving is also the most common one. Over the years, domains collect includes for services that were tried once, changed or cancelled. A newsletter tool from three years ago, a former web host, an old support platform. Each one costs lookups, and each one also authorises a sender that you no longer control. Removing them lowers the count and lowers the risk at the same time.

Before you delete anything, check that the service is really gone. Look at the mail logs or ask the people who use each tool. If an unused service still sends a monthly message that nobody remembered, removing it from SPF will make that message start failing.

Fix 2: smarter ways to cut lookups

Use fixed addresses where you control the server

If your website or an internal system sends mail directly from a server with a fixed address, list that address with ip4 or ip6 instead of a name that needs resolving. An address costs no lookup at all. Replace a term such as “a” or “mx” with the addresses it stands for, when those addresses rarely change. If they do change, remember to update the record when they do.

Flattening, with care

Flattening means replacing an include with the list of addresses that the included record contains. It removes the lookups, but it freezes the list. Large providers change their sending addresses from time to time, and a flattened record does not follow the change. Mail from a new address then fails SPF without any warning. If you flatten by hand, you take on the job of checking it regularly. Some DNS and e-mail services offer automatic flattening that keeps the record up to date. Whichever way you do it, treat flattening as the last resort, not the first.

A flattened record also grows long. A single DNS text string is limited to 255 characters, so a long record must be split into several strings inside one record, as the article on the 255-character limit explains. Keep the result as one record. Two separate SPF records are a different critical finding, covered in SPF findings explained and in the guide to merging two SPF records.

Give busy services their own subdomain

SPF is checked on the domain in the “envelope sender”, also called the return-path or bounce address, and not only on the address people see in the From line. Many bulk and transactional senders let you set a custom bounce domain, for example a subdomain of your own. When you do, that subdomain gets its own short SPF record that contains only that service, and your main record no longer needs the service’s include. This splits the lookup budget: each subdomain has its own ten. It also keeps a problem at one provider from affecting your main mail.

Whether this works depends on the service, so read its documentation first. Also keep DMARC in mind: for SPF to count towards DMARC, the domain it was checked on must align with the From domain, and a subdomain passes the default relaxed alignment. The guide to relaxed and strict alignment explains this.

After the change: check again

Edit the record in DNS, wait for the change to spread, and run the audit again. The finding should disappear when the total is ten or less. DNS changes can take time to reach every receiver, which the article on DNS propagation and TTL explains. Then send a test message to a mailbox you control and read the headers to see that SPF passes. The article on reading e-mail headers shows where to look.

A worked example

A small accounting firm uses a mailbox service, an invoicing system, a newsletter tool, a booking tool and a helpdesk. Its audit report shows a critical finding: SPF needs 14 DNS lookups. The owner opens each include and finds that the newsletter tool was replaced two years ago and the helpdesk is no longer used. Removing both brings the count to 9. The invoicing system turns out to allow a custom bounce domain, which the firm sets up on a subdomain with its own record. The main record is now short, the count is 6, and a re-check clears the finding. Since the numbers in this example are illustrative, your own counts will differ, but the steps are the same.

To see the real number for your domain, run a Site AI Audit. The check requires a free account; the plans unlock the full report with the details of every finding.

Related reading

The bottom line

An SPF record may need no more than ten DNS lookups. Count them including the nested includes, remove senders you no longer use, use fixed addresses where you can and give busy services their own subdomain. Then run the audit again to confirm the critical finding is gone.

GYIK

Is exactly ten lookups allowed?

Yes. The finding appears only when the total is above ten.

Do ip4 and ip6 terms count?

No. Terms that hold addresses directly need no DNS question, so they do not count towards the limit.

Why does my record look short but the audit reports more than ten lookups?

The count includes the lookups inside every included record. A short record that points to several large providers can easily pass ten.

Is flattening the SPF record a good idea?

Only as a last resort. It removes lookups but freezes the list of addresses, so you must keep it up to date or some of your mail will start failing.

Will the finding hurt my mail right away?

Receivers treat an SPF record over the limit as an error, so some of your messages may be rejected or marked as spam. How much depends on the receiver, which is why the audit marks it critical.

#DNS#Email Authentication#SPF
Ellenőrizd a saját weboldaladat.Védett a weboldala a feltörés ellen?
Oldalam ellenőrzése

Továbbiak a blogról

Összes cikk →
Internet Solutions

Továbbiak csapatunktól

Az Internet Solutions fejlesztése. Próbálja ki többi termékünket is — mindegyik másképp spórol Önnek időt.

internet-solutions.net ↗