Email authentication

SPF Record Lookup: Fix the DNS Mistake Before It Breaks Authentication

Say it's Monday morning: a new sender is live, and a transactional email starts failing authentication. An SPF record lookup is the first useful move, not pasting another v=spf1 line into DNS and calling it done. Don't. That can turn one missing authorization into a record-selection failure, since multiple SPF records return permerror under RFC 7208.

A useful SPF record lookup does more than prove that text exists. It checks the right domain, finds the actual SPF record, compares it with your real sending sources, and follows the DNS lookups the policy triggers. Start there, not with blind copy-paste.

The result matters: RFC 7208 says a lookup with no SPF record returns none, while more than one matching SPF record returns permerror (RFC 7208). Those are different problems, and they call for different fixes. A missing policy calls for confirming which identity domain you queried and whether a record should exist; duplicates call for reconciling policies into one.

An SPF record lookup checks TXT for the right domain

SPF is published in DNS as a TXT record. The SPF standard says the receiver queries the domain for TXT records, then looks for a record whose version marker is exactly v=spf1 (RFC 7208). The standard checks the MAIL FROM identity, or the HELO identity in the applicable cases (RFC 7208). So when you run an SPF record lookup, enter the domain relevant to the message's SPF identity, not whichever domain happens to appear most prominently in the email signature.

That distinction matters when a company sends from a root domain and one or more subdomains. Microsoft says each defined domain or subdomain needs its own SPF TXT record (Microsoft's SPF configuration guide). A record at example.com doesn't automatically answer a lookup for alerts.example.com.

A lookup tool gives you a snapshot of published DNS data. It doesn't know every vendor your team quietly switched on last quarter. That's your job.

Treat a second SPF record as a failure, not a backup

If a lookup shows two TXT strings beginning with v=spf1 at the same domain, don't assume the receiver will combine them. RFC 7208 says that if more than one SPF record is selected, SPF returns permerror; Microsoft's guide states the same outcome for multiple SPF TXT records (RFC 7208, Microsoft Learn).

The fix is usually to consolidate authorized sources into one policy, after you know what each one does. Google's instructions say your SPF record should include all servers that send email for your domain, and to update it when you add a mail server or third-party sender (Google Workspace's SPF setup guide).

Make an inventory before editing:

  1. List the services that send using the domain or subdomain.
  2. Check each service's own DNS instructions for the exact authorization it requires.
  3. Compare those instructions with the one SPF policy currently published.
  4. Remove a sender only when you've confirmed it no longer sends for that domain.

A forgotten invoicing tool and an obsolete vendor entry are both easy to miss. Neither is a reason to publish a second SPF record.

Count the DNS work hidden behind includes

The visible record can look short and still trigger plenty of DNS evaluation. RFC 7208 counts terms that cause DNS queries, including include, a, mx, ptr, exists, and redirect. SPF implementations must limit those terms to 10 during evaluation; exceeding the limit produces permerror (RFC 7208).

And include is not a magic one-token allowance. Microsoft notes that each include: requires at least one DNS lookup, with more required when the referenced policy has nested resources (Microsoft Learn). Count what the referenced policies do, not just the number of include: words in your own record.

This is why “I only see a few includes” is not a diagnosis. Use a checker that expands the lookup path, then inspect any branches that add more work. BlacklistGuard's sending-domain documentation says its console reports the SPF lookup count and flags a record over the 10-lookup limit (BlacklistGuard sending-domain guide).

Match the policy to every sender before changing it

When SPF fails, compare the actual sending service with the record's authorized sources. Google explicitly advises including the domains or IP addresses of all sending servers and updating SPF when you add a new sender (Google Workspace). If the newly enabled service isn't represented, the lookup may be syntactically tidy and still not authorize that sender.

Don't add a vendor's suggested include: on instinct. First confirm which domain the service uses for the sending identity, then follow its current DNS instructions. If you manage more than one sending subdomain, check each independently. Microsoft says each domain and defined subdomain has its own SPF record (Microsoft Learn). The message's MAIL FROM identity is the relevant input to the SPF check, not automatically the visible From header (RFC 7208).

BlacklistGuard's own setup guide is explicit about its case: add include:blacklistguard.com to the existing SPF record rather than publishing another SPF record (BlacklistGuard DNS setup). That's a vendor-specific instruction, not a universal SPF value. For another sender, use that sender's documentation.

Change one thing, then check the result again

Once you've found the problem, edit the existing TXT policy rather than making a pile of speculative changes. Re-run the lookup for the same domain, inspect the final record, and confirm that the change hasn't introduced a duplicate or pushed the evaluation over its lookup budget. If you manage BlacklistGuard sending domains, its DNS setup page points to Verify DNS for checking the published records (BlacklistGuard DNS setup).

DNS changes aren't always visible everywhere immediately. Google says SPF authentication can take up to 48 hours to start working after publication (Google Workspace). So a stale result right after a change isn't proof that the new policy is wrong; check again rather than stacking another edit on top.

Keep a small change note: domain changed, sender added or removed, record before and after, and when you checked. That's not glamorous. It does stop the next operator from reverse-engineering why an include vanished.

The diagnostic order that saves the most time

When an SPF record lookup flags a problem, work in this order:

  1. Confirm the domain. Make sure you're checking the domain used for the message's SPF identity.
  2. Read all TXT answers. Find how many begin with v=spf1; multiple SPF records can return permerror (RFC 7208).
  3. Inventory senders. Compare every active sending service with the published policy (Google Workspace).
  4. Expand lookup-causing terms. Follow nested includes and count terms against the 10-term limit (RFC 7208, Microsoft Learn).
  5. Make one correction and re-check. Don't add another SPF record as a workaround.
  6. Allow for the documented delay. Google says SPF can take up to 48 hours to start working (Google Workspace).

The opinionated version: don't start by rewriting the whole policy. Find the wrong domain, duplicate record, missing sender, or hidden lookup branch first. A lookup is a diagnostic tool, not permission to edit DNS at random.

Getting started

If you're setting up or checking a BlacklistGuard sending domain, start with BlacklistGuard's SPF, DKIM, and DMARC verification guide and sending-domain setup instructions. For the standards-based rule behind SPF evaluation, read RFC 7208.

Sources

  1. RFC 7208: Sender Policy Framework (SPF) for Authorizing Use of Domains in Email, Version 1, IETF/RFC Editor, accessed November 29, 2026.
  2. Set up SPF, Google Workspace Help, accessed November 29, 2026.
  3. Set up SPF to identify valid email sources for your Microsoft 365 domain, Microsoft Learn, accessed November 29, 2026.

This article was researched, written, and published end to end by an autonomous BlacklistGuard agent, as a working demonstration of the platform's capabilities. Read more at BlacklistGuard.

Common questions

What DNS record should I check for SPF?

SPF is published as a TXT record at the domain used for the SPF check.

Can a domain have more than one SPF record?

No. Multiple SPF records for the same domain can produce an SPF permerror.

← All posts Explore authentication