NordVPN Promotion

Home / Blogs

Your SPF Record Can Break Without Anyone Touching It

Take a company that sends staff mail through Microsoft 365, sales mail through Salesforce and support mail through Freshdesk. Each of those services asks customers to add an include to their SPF record, so the company’s record is short and tidy:

v=spf1 include:_spf.salesforce.com include:email.freshdesk.com include:spf.protection.outlook.com ~all

The company is made up, but the record is a common one. SPF allows at most ten lookup-causing terms in a single check, usually just called lookups, and on 30 November 2026 those three include all ten.

Microsoft 365 comes last, so the staff’s everyday mail is matched at the tenth. If Salesforce or Freshdesk adds a single lookup to its own record, that mail needs an eleventh and gets a permanent error (“permerror”) instead of a pass. The company’s own record stays exactly as it was.

Nobody is warned in advance. The error shows up in bounces from some receivers, in message headers and, for mail that got that far, in DMARC aggregate reports.

We counted how close real domains run to that edge, across 55,106 mail domains behind the world’s 100,000 most-visited websites. Roughly one in eight valid SPF records needed 8, 9 or 10 lookups. This article looks at how a short record ends up that deep, when it starts to cost mail, and how to make room.

Three Includes, Ten Lookups

An example SPF record with three includes (Salesforce, Freshdesk and Microsoft 365) showing how nested dependencies consume the ten-lookup limit. Microsoft 365 mail is matched at the tenth lookup; an additional lookup from either preceding provider would cause a permanent SPF error (permerror).

SPF has capped each check at ten DNS-querying terms since its first RFC, RFC 4408, in 2006. The cap limits how much DNS work a single message can cause, for the receiver and for other people’s DNS servers. The terms that count are include, a, mx, ptr, exists and redirect; ip4, ip6 and all are free.

RFC 4408 was explicit that the ten include “any lookups caused by the use of the “include” mechanism or the “redirect” modifier.” The current version, RFC 7208, keeps the same total. It also recommends a second, smaller limit: a check should end in a permanent error once more than two lookups return no records at all.

So the limit is not about the terms you can see in your own record. An include fetches the provider’s record and evaluates it as part of the same check, and every lookup in there counts too, however deep it sits. Followed all the way down, the record above costs ten, and seven of them come from Freshdesk’s include.

Term in the treeLookups
include:_spf.salesforce.com(Salesforce)1
→exists:%{i}._spf.mta.salesforce.com1
include:email.freshdesk.com(Freshdesk)1
→include:sendgrid.net1
→ →include:ab.sendgrid.net1
→include:fdspfus.freshemail.io(US)1
→include:fdspfeuc.freshemail.io(EU)1
→include:fdspfind.freshemail.io(India)1
→include:fdspfaus.freshemail.io(Australia)1
include:spf.protection.outlook.com(Microsoft 365)1
Total10

We got this wrong ourselves at first. The first version of our counter took an include that appeared twice in one tree for a loop. It’s common for two providers to include the same record, SendGrid’s, for example, and that isn’t a loop.

SPF evaluates terms in order and stops at the first match, so ten is the most this record can cost. Mail matched early needs fewer lookups, and a check only fails when it reaches an eleventh. Checkers report the full count because a sender matched last, or not at all, needs all of it.

One more detail decides which includes matter at all. SPF checks the envelope sender, the bounce address a server announces before the message itself, and not the From line people see. Services that send with your own domain as the bounce address need an include on your main record, as Microsoft 365 does for staff mail. Services that use a bounce address on their own domain, or on a subdomain of yours, never touch your main record’s budget.

Deep Includes Usually Have a Reason

Many large senders, Google and Microsoft 365 among them, now cost a single lookup, because their include holds a flat list of address ranges. Salesforce stays at two, however many servers it runs, because it uses an exists term with a macro. Macros have trade-offs of their own, and not every admin likes them.

Freshdesk is deeper for a reasonable reason. It runs data centers in several regions, and its main infrastructure covers four of them (the US, the EU, India and Australia) plus SendGrid. Regional infrastructure is something customers ask for. Freshdesk’s help article on SPF also offers a narrower option, including only the record for your own data center, which costs one lookup instead of seven.

Providers change these records when they add regions or move infrastructure. Includes are resolved each time a message is checked, so your count moves with theirs. When Google cut its include from four lookups to one in December 2025, every customer’s count dropped overnight. A new region somewhere can raise it just as fast.

Roughly One in Eight, With No Clear Drop for Popular Sites

At InfraNest Research, we measured SPF and DMARC on the mail domains behind the 100,000 most-visited websites in Google’s Chrome UX Report (October 2026). The scan ran on 13 and 14 November 2026 and covered 55,106 domains with a usable MX record whose mail records could be read. The analysis plan was registered before any result was computed, and the code and all totals are public.

A valid SPF record, in the study’s terms, is a single record with no permanent error anywhere in its tree. Of those, 12.3% needed 8, 9 or 10 lookups. Separately, for 2.5% of all published SPF records, about one in forty, our scanner counted more than ten. That count follows every branch and also includes terms after all, which a receiver never reaches, while an include built from a macro counts as one without being followed. A few records may therefore be counted a little high or low.

I expected a clear drop as popularity increased. We didn’t see one. Among the top 1,000 sites, 10.4% of valid records were near the limit, against 12.0% to 13.5% in the four bands from rank 1,001 to 100,000. The figures held in a complete second scan two days later, and when we counted one domain per group of related domains instead of every domain a brand owns.

We measured DNS, not mail. We can say which records would fail, but not how much mail that cost anyone, because DKIM keys sit under names each sender picks and DNS gives no way to list them. And records change; this is one moment in time.

When an SPF Error Affects Delivery

In February 2024, Google and Yahoo began requiring SPF, DKIM and DMARC from bulk senders; Google draws the line at 5,000 messages a day to personal Gmail accounts. Microsoft followed for Outlook.com in May 2025 with the same threshold, and its rules say SPF must pass.

For most mail, DMARC decides how much a broken SPF record costs, although some receivers act on the SPF result on its own. SPF is one of the two checks behind DMARC. The other, DKIM, is a signature the sending service adds to each message, which the receiver verifies against a public key published under your domain.

DMARC ties both checks to the address people see: a message passes when SPF or DKIM passes, and the domain that passed aligns with the domain in the From address.

A sender that signs with DKIM for your domain still passes DMARC on a day SPF fails, though a receiver that checks SPF separately can still refuse the mail. A sender that doesn’t fails DMARC.

With p=none, the domain owner expresses no preference, and receivers apply their own filtering. With quarantine or reject, the owner tells receivers that failing mail is suspect or not valid, and large receivers generally junk or refuse it. 42.8% of the mail domains in our data have one of those policies in force for all failing mail.

RFC 9989, the DMARC standard published in May 2026, already says domains with p=reject “MUST NOT rely solely on SPF for a DMARC pass”, mostly because forwarding breaks SPF. The lookup limit is one more reason.

How to Get Your Count Down

Start by counting. dmarcian’s SPF Surveyor follows every include and shows where each lookup comes from. Scott Kitterman, the author of RFC 7208, runs an SPF validator that checks whether a record is valid. The SPF check on InfraNest runs the same code as our study, if you want your count the way we measured it (mine; see the disclosure below). Checkers don’t always agree on edge cases, so look at where each lookup comes from as well as the total.

Then go through the record with the people who own each service. Records collect includes over the years: the invoicing tool finance replaced, the previous CRM, a newsletter service someone tried for one campaign. Canceling the account doesn’t remove the include, and nobody owns that line in DNS. Your DMARC aggregate reports show which servers still send mail using your domain. An include with nothing behind it for a few months is a candidate to go.

  • Remove includes for services you no longer use, and make that part of cancelling a service. If the domain behind an old include lapses, whoever registers it next can authorize their own servers to send as you.
  • Ask for a narrower include. Some providers publish smaller records, such as one per region, next to their main include.
  • Move bulk mail off your main record. Many newsletter and transactional services let you set a custom bounce domain, such as bounce.example.com, with its own SPF record. Under DMARC’s default relaxed alignment, that still aligns with a From address on example.com. The newsletters keep their From line, and their lookups leave your main record.
  • Sign everything with DKIM for your own domain. DKIM uses none of SPF’s ten lookups, and it generally survives forwarding, which breaks SPF unless the forwarder rewrites the bounce address. Microsoft 365, for example, only signs mail from your own domain once you publish two CNAME records and switch DKIM on. Signing with your own domain is also what RFC 9989 asks for.
  • Watch your DMARC aggregate reports. Look for permerror in the SPF results they list for your own sending sources. Mail a receiver refused on the SPF result alone, before the message itself was sent, won’t appear there; the bounce is the only trace.
  • Flatten only with automation. A hand-made list of IP addresses saves lookups but goes stale when a provider changes its ranges.

For the company from the start, one change does most of the work. With Freshdesk’s EU record in place of its main include, the main record costs four lookups instead of ten (2 for Salesforce, 1 for Freshdesk, 1 for Microsoft 365). The regional record leaves SendGrid out, so first check in your aggregate reports that no Freshdesk mail arrives from SendGrid’s addresses, and turn on Freshdesk’s DKIM signing. The newsletter tool marketing wants next gets its own bounce subdomain and never touches those four.

That leaves six lookups of room for whatever the providers change next. If your own record is at eight or more, make that room now, before a provider or a new service uses it up.

A Question for DNS Hosts and Senders

SPF lives in DNS, which is often run by someone other than the mail team. A check when someone saves a record helps, but it can’t catch the drift this article is about: the record that crosses ten can be one nobody has touched in months. Catching that means re-counting published records from time to time and telling the owner. Refusing records over ten would be too blunt, since they still work for the senders matched early.

The other end is the senders. Each one decides how much of its customers’ ten-lookup budget it takes, and can change that without notice. Google, Microsoft and Salesforce show that a narrow include works at scale. Should large senders publish a lookup budget for their include and stick to it, or should DNS hosts take on the warning? I’d like to hear from people who run DNS for others.

The full study, with method and totals: Email security of the world’s 100,000 most-visited websites.

By Jaspar Steenman, Founder at InfraNest —

Disclosure: I run InfraNest, which makes software for managing domains, DNS and servers. The study was done by InfraNest Research.

Visit Page

Filed Under

Comments

  Notify me of follow-up comments

We encourage you to post comments and engage in discussions that advance this post through relevant opinion, anecdotes, links and data. If you see a comment that you believe is irrelevant or inappropriate, you can report it using the link at the end of each comment. Views expressed in the comments do not represent those of CircleID. For more information on our comment policy, see Codes of Conduct.

CircleID Newsletter The Weekly Wrap

More and more professionals are choosing to publish critical posts on CircleID from all corners of the Internet industry. If you find it hard to keep up daily, consider subscribing to our weekly digest. We will provide you a convenient summary report once a week sent directly to your inbox. It's a quick and easy read.

Related

Topics

Domain Names

Sponsored byVerisign

Brand Protection

Sponsored byCSC

DNS

Sponsored byDNIB.com

DNS Security

Sponsored byWhoisXML API

Cybersecurity

Sponsored byVerisign

New TLDs

Sponsored byRadix

IPv4 Markets

Sponsored byIPv4.Global

NordVPN Promotion