The SPF 10-Lookup Limit

SPF rules have a strict limit of 10 lookups. If you go over this, your emails will fail. Veldica automatically counts these nested rules to help you stay safe.

The SPF 10-Lookup Limit

4-Step SPF Flattening Guide

1
Check rules

Find all the include: rules in your current record.

2
Change to IP

Replace vendor rules with direct IP addresses where possible.

3
Check the limit

Make sure your new record uses 10 or fewer lookups.

4
Automate checks

Use Veldica to monitor your domains and catch new errors automatically.

SPF Too Many DNS Lookups

The most common reason for SPF errors is going over the 10-lookup limit. When this happens, mail servers stop checking your record, and your emails can be blocked or sent to spam.

If you are researching SPF flattening as a fix, start with the full SPF flattening guide. This page focuses on the lookup-limit failure itself: what counts, why nested includes hide the real number, and how to get an exact count.

1. The 10-Lookup Rule

To keep the internet fast and safe, the rules for SPF limit how many lookups one record can perform. These rules include:

  • include
  • a
  • mx
  • ptr
  • exists
  • redirect

Rules like ip4 and ip6 are free because they don't need a lookup. However, every include counts as one lookup, and any include hidden inside that rule also counts toward your total.

2. Why It's Hard to See

A basic check of your SPF record only shows the top level. For example:

v=spf1 include:_spf.google.com include:sendgrid.net include:salesforce.com ~all

This looks like only 3 lookups. But just one of those providers might have 4 or 5 more lookups hidden inside their own rules. Without checking the whole chain, it's impossible to know if you are safe at 9 lookups or broken at 11 lookups.

3. How Veldica Checks SPF

Veldica's engine follows every rule in your SPF record, just like a mail server does. We give you:

  • Total Count: The exact number of lookups used across all your rules.
  • The Path: A specific trace at exactly which rule pushed you over the limit.
  • Error Prediction: A fail result if your count is 11 or higher.

4. What Happens if You Fail?

If your SPF record has too many lookups, the impact is serious:

  • SPF Failure: Mail servers stop reading your record. Your real emails may be marked as spam or rejected.
  • Security Gaps: If you use SPF to prove who you are, your security will fail, making it easier for scammers to fake your emails.

5. How to Fix It

If you have too many lookups, you have two main choices:

  1. Clean Up: Remove old rules you don't use anymore or replace them with direct IP addresses.
  2. SPF Flattening: Use Veldica's Fix-Plan to find exactly which IP addresses you need and combine them into one compact record.

Audit Your SPF Today

Need the exact count for your domain? Get an SPF Flattening Risk Report or use the Veldica Pro Audit API. Use our verification steps to catch errors before they affect your users.

Keep Exploring

Use the Workflow Library to browse more guides, comparisons, and integration examples to continue your evaluation.