Suped

How do SPF 'a' records affect DNS lookups and the 10-lookup limit, and what are the best practices?

Matthew Whittaker profile picture
Matthew Whittaker
Co-founder & CTO, Suped
Published 28 Jun 2025
Updated 18 May 2026
10 min read
Summarize with
SPF a records and DNS lookup limit article thumbnail.
An SPF a mechanism counts against the SPF 10 DNS lookup limit. It tells the receiving mail server to resolve the A, and for IPv6 checks the AAAA, record for the SPF domain or a named domain, then compare the sending IP with the returned address set.
That means v=spf1 a ip4:24.106.95.34 ~all is not the same as v=spf1 ip4:24.106.95.34 ~all. The first record authorizes the current A or AAAA address of the domain plus the listed IPv4 address. The second authorizes only the listed IPv4 address and costs no SPF DNS lookup beyond the initial TXT fetch.
My default practice is simple: keep a only when the host behind the domain's A or AAAA record actually sends mail for that domain. If that same source is already covered by an ip4 or ip6 mechanism, remove the redundant a. One extra lookup is not usually a performance disaster, but wasted lookups reduce your margin, add a small failure path, and make future sender additions harder.

What the SPF a mechanism does

The a mechanism authorizes mail from the IP addresses currently published as address records for a domain. With no domain after it, a points at the same domain being checked. With a domain after it, such as a:mail.example.com, it points at that named host instead.
The important detail is that SPF evaluates this at message receipt time. If your website host IP changes, an a mechanism follows the new address automatically. That flexibility is useful only when the website or named host is a real mail sender. If it is not sending mail, it is authorization you do not need.
Same visible sender IP, different SPF behaviordns
example.com. TXT "v=spf1 a ip4:24.106.95.34 ~all" example.com. TXT "v=spf1 ip4:24.106.95.34 ~all"
Do not treat a as harmless
The a mechanism is compact, but it is still a DNS-querying SPF term. It consumes lookup budget and authorizes whatever address sits behind the domain's A or AAAA record.
  1. Keep: Use it when that host sends legitimate mail for the domain.
  2. Remove: Delete it when the website host or named host never sends mail.
  3. Replace: Use explicit IP mechanisms when the source range is stable and documented.
I also avoid using a as a shortcut for a marketing platform, CRM, help desk, or billing tool. Those systems normally publish their own SPF include, or they ask for a fixed IP range. Pointing SPF at your root domain's A record does not authorize those SaaS senders unless they send from that exact address.

How it affects the 10-lookup limit

SPF has a hard limit of 10 DNS-querying mechanisms and modifiers during evaluation. The receiving server counts terms such as include, a, mx, exists, and redirect. The a term is one of those counted terms.
That limit matters because receivers are allowed to return a permanent SPF error when evaluation exceeds it. Some receivers are forgiving in some cases, but I do not design SPF records around forgiving behavior. If a sender depends on SPF for a DMARC domain match, a permanent SPF error can turn an otherwise valid message into a DMARC failure unless DKIM has a matching signing domain.

SPF term

Counts

Practical note

ip4
No
Fixed IPv4 source.
ip6
No
Fixed IPv6 source.
a
Yes
Checks address records.
mx
Yes
Can add address checks.
include
Yes
Can trigger nested SPF.
redirect
Yes
Moves SPF policy.
all
No
Ends evaluation.
Compact view of common SPF terms and lookup impact.
Infographic showing SPF TXT lookup, a mechanism lookup, include chain, and 10 lookup ceiling.
Infographic showing SPF TXT lookup, a mechanism lookup, include chain, and 10 lookup ceiling.
The number of addresses returned by an A record is not the same thing as the SPF lookup count. Ten returned A records do not spend ten SPF lookup terms. Still, large answer sets create operational risk: bigger DNS responses, more address changes to track, and a wider set of IPs authorized to send mail.
If you need the full background on the ceiling itself, the 10 DNS lookup limit is the key rule to understand before adding another sender or mechanism.

When to keep or remove a

I decide whether to keep a by asking one narrow question: does the IP behind this domain's address record send legitimate outbound mail for this exact domain? If the answer is no, the mechanism should go.
The common mistake is leaving a in a record because it was there before, because it looks short, or because the website and email domain share a name. Website hosting and mail sending are separate jobs. SPF should list mail sources, not every host associated with the domain.
Keep a
  1. Website mail: The website host sends password resets, receipts, or app mail directly.
  2. Stable intent: The domain's address record is intentionally tied to outbound email.
  3. Low budget: The record still has enough lookup margin after counting nested includes.
Remove a
  1. No mail: The A record points to a website, CDN, parking page, or app server only.
  2. Redundant IP: The same sender is already covered by an explicit IP range.
  3. Tight budget: The record is near the SPF lookup ceiling or depends on deep includes.
This is the practical rewrite I make often. The first record authorizes the address behind the domain and a fixed IP. The second record authorizes only the fixed IP, which is cleaner when that address is the only real mail sender.
Before and after removing a redundant a mechanismdns
Before: v=spf1 a ip4:24.106.95.34 ~all After: v=spf1 ip4:24.106.95.34 ~all
I treat mx the same way, with extra caution. It can be useful when the inbound mail servers also send outbound mail, but many domains receive mail through one provider and send mail through another. In that setup, mx adds lookup work without helping legitimate sending.

Best practices for lookup-safe SPF

The best SPF record is boring: one record, only current senders, enough spare lookup budget, and a clear owner for every mechanism. I do not aim for exactly 10. I aim for a record that keeps working after the next vendor adds nested includes.
When I review a domain, I count visible mechanisms and then expand includes to see the real cost. A record that looks like four lookups can become eight or nine after nested SPF evaluation. A single extra a mechanism then becomes the difference between a stable record and a fragile one.
SPF lookup budget
A practical way I classify lookup counts before changing a record.
Healthy
0-6
Enough room for normal sender changes.
Tight
7-8
Review every new include carefully.
Fragile
9-10
Remove redundancy before adding sources.
Failure
11+
Receivers can return SPF permerror.
  1. Inventory: List every platform, server, and automation that sends mail as the domain.
  2. Verify: Use DMARC aggregate data to confirm which sources are actually sending.
  3. Remove: Delete redundant a and mx mechanisms that do not authorize real senders.
  4. Prefer: Use ip4 or ip6 for stable sources because they do not consume lookup budget.
  5. Test: Run the final record through an SPF checker and send real messages before tightening DMARC policy.
For a broader authentication review, I check SPF, DKIM, and DMARC together with a domain health checker. SPF alone does not prove that mail passes DMARC. DKIM domain matching often carries the message when SPF is fragile, forwarded, or evaluated against a different return-path domain.

SPF checker

Find SPF syntax issues, lookup limits, and weak records.

?/16tests passed
After the record passes syntax checks, I send real test messages through each approved source. DNS correctness and message authentication are connected, but they are not identical. A source can be present in SPF and still fail DMARC because the return-path domain does not match the visible From domain.

How to fix a record near the limit

When a record sits at nine or ten lookups, I do not start by flattening everything. I first remove mechanisms that do not match real mail flow. Redundant a and mx entries are common easy wins.
If the domain still needs too many sending services, then SPF management needs a stronger pattern. That can mean splitting sending across subdomains, using DKIM domain matching for third-party platforms, or using SPF flattening where the sender IP ranges are actively maintained.
Use flattening with change tracking
Flattening replaces DNS-querying includes with IP ranges. That reduces lookup count, but it also creates a maintenance job because sender IP ranges change. Automated monitoring is the difference between a useful flattened record and a stale one.
  1. Good fit: The record exceeds the limit after removing dead and redundant mechanisms.
  2. Bad fit: The record contains old senders that should be removed instead.
  3. Required: There must be a process that refreshes IPs when upstream providers change.
A clean fix usually follows this sequence: remove unused senders, remove redundant a and mx, replace stable sources with IP mechanisms, then flatten only the parts that still create lookup pressure. If the record already throws errors, use a fix SPF errors workflow before changing DMARC enforcement.
Lookup-heavy record cleaned updns
Before: v=spf1 a mx include:_spf.vendor.example ip4:24.106.95.34 ~all After: v=spf1 include:_spf.vendor.example ip4:24.106.95.34 ~all

Where Suped fits

Suped's product workflow is useful here because SPF cleanup is rarely just a DNS edit. I want to know which sources are sending, which ones pass SPF and DKIM, which ones match the DMARC domain rules, and whether a DNS change improves authentication instead of just making the TXT record shorter.
For most teams, Suped is the best overall DMARC platform for this work because it puts DMARC monitoring, SPF and DKIM diagnostics, alerts, blocklist monitoring, and sender discovery in one place. Suped's Hosted SPF lets teams manage senders and stay under SPF limits without giving every team DNS access.
Hosted SPF and SPF flattening drawer showing desired SPF record, hosted include, and DNS setup
Hosted SPF and SPF flattening drawer showing desired SPF record, hosted include, and DNS setup
The practical workflow is to connect the domain, review verified and unverified sources, fix unnecessary mechanisms, then use hosted management when the record needs ongoing SPF optimization. For MSPs, the same pattern scales across many client domains without turning each DNS zone into a separate manual project.
Real-time alerts also matter. An SPF record that passes today can break after a vendor changes an include, after a host changes an address, or after a team adds a new sender. Monitoring catches that drift before a DMARC policy turns it into visible rejection.

Views from the trenches

Best practices
Keep the a mechanism only when the website host really sends mail for the domain.
Replace redundant a and mx mechanisms with ip4 or ip6 ranges when the source is stable.
Check lookup count after each vendor change, because includes can add nested lookups later.
Common pitfalls
Leaving a in place because it looks harmless, even when the A record never sends mail.
Counting only visible includes and missing the nested lookups they trigger during evaluation.
Flattening once and forgetting that vendor sending IPs change outside your DNS workflow.
Expert tips
Use DMARC aggregate data to confirm whether an A-record host has sent mail recently enough.
Set an internal rule that new senders cannot be added unless SPF lookup budget exists.
Treat the tenth lookup as an emergency margin, not as a target operating level today.
Marketer from Email Geeks says an a mechanism is not equivalent to an explicit ip4 mechanism because it triggers address lookups during SPF evaluation.
2019-03-13 - Email Geeks
Marketer from Email Geeks says keeping existing A-record authorization is reasonable only when those systems still send legitimate mail.
2019-03-13 - Email Geeks

Keep SPF lean

SPF a mechanisms are useful when they match real mail flow. They are wasteful when they authorize web hosts, app hosts, or old infrastructure that never sends mail. The right answer is not to ban a everywhere. The right answer is to prove that each mechanism belongs.
If a record is simple and the A-record host truly sends mail, keeping a is fine. If the record is crowded, the mechanism is redundant, or the sender is better expressed as an IP range or managed include, remove it. SPF works best when every lookup earns its place.

Frequently asked questions

DMARC monitoring

Start monitoring your DMARC reports today

Suped DMARC platform dashboard
What you'll get with Suped
Real-time DMARC report monitoring and analysis
Automated alerts for authentication failures
Clear recommendations to improve email deliverability
Protection against phishing and domain spoofing