Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is an SPF Record?

An SPF record lists the servers permitted to send mail for your domain. It is the oldest email authentication control, the easiest to publish, and the easiest to get subtly wrong.

Illustration for the cybersecurity term SPF Record
Home / Blog / Cybersecurity Terms / What Is an SPF Record?
17 November 2026

What Is an SPF Record?

What Is an SPF Record?

Sender Policy Framework, specified in RFC 7208, lets a domain owner publish a list of the hosts permitted to send email on that domain’s behalf. A receiving server compares the connecting address against the list and treats a mismatch according to the policy you have stated. It is a single DNS record, it takes minutes to publish, and it is the foundation that DMARC builds on.

Reading the Record

SPF is a TXT record at the domain apex:

example.co.uk. IN TXT "v=spf1 ip4:203.0.113.0/24 include:spf.protection.outlook.com include:_spf.example-crm.com -all"

The mechanisms are evaluated left to right and the first match wins. ip4 and ip6 name addresses directly. include pulls in another domain’s record, which is how SaaS senders are authorised. a and mx authorise the hosts named in those records. all matches everything and therefore belongs last.

The qualifier on all is the policy statement. -all is a hard fail, meaning anything not listed is unauthorised. ~all is a soft fail, meaning treat it as suspicious but accept. +all authorises the entire internet and should never appear; it does appear, and when it does it is nearly always a copy-paste error.

Use -all once you are confident the record is complete. A soft fail is appropriate during rollout and is a reasonable permanent choice only if DMARC enforcement is also in place, since DMARC supplies the policy anyway.

The Ten-Lookup Limit

This is the rule that breaks most records. SPF evaluation may perform at most ten DNS lookups, counting every include, a, mx, ptr, and exists mechanism, and crucially counting them recursively — an include that itself contains three includes consumes four. Exceed ten and the result is permerror, which most receivers treat as a failure, so a record that is too long can be worse than no record at all.

Organisations hit the limit after the fourth or fifth marketing platform. The usual remedies are removing senders that no longer exist, replacing an include with the explicit ip4 ranges where the provider publishes stable addresses, moving some senders to a subdomain with its own record, or using a flattening service that resolves includes into addresses automatically. Flattening is effective and carries a maintenance obligation, because a provider that changes its address ranges breaks your mail silently until the record is regenerated.

Two smaller rules matter too: the record must be a single TXT record — publishing two SPF records for one domain is a permanent error — and the ptr mechanism is deprecated and should not be used.

What SPF Cannot Do

Three limitations define why SPF alone is insufficient.

It checks the envelope sender, not the visible From address. An attacker can pass SPF for their own domain while displaying your domain in the header the recipient actually sees. Only DMARC requires alignment between the two.

Forwarding breaks it. When a mailbox forwards a message, the forwarding server becomes the connecting host and is not in your record, so SPF fails. DKIM usually survives forwarding, which is why DMARC accepts either.

Shared infrastructure dilutes it. An include for a large provider authorises every address in that provider’s sending estate, including those used by other customers. SPF proves the mail came from somewhere authorised, not from you specifically.

Practical Steps

Inventory every system that sends on your behalf — the mail platform, the CRM, the invoicing system, the recruitment portal, the transactional sender used by one application. DMARC aggregate reports are the most reliable way to produce that list, because they show what is actually sending rather than what anyone remembers.

Then publish for every domain you own, including ones that never send mail: a bare v=spf1 -all on a parked domain costs nothing and removes it as a spoofing target. Check the record with a validator that counts lookups, and re-check whenever a supplier changes. Finally, publish DKIM and DMARC, because SPF on its own stops very little. Our Email Security Solutions cover the whole authentication stack rather than one record of it.

FAQ – Frequently Asked Questions

What Is the SPF Ten-Lookup Limit?

SPF evaluation may perform at most ten DNS lookups, counting include, a, mx, ptr, and exists mechanisms recursively through nested records. Exceeding it produces a permanent error that most receivers treat as a failure. Remove unused senders, replace includes with explicit address ranges where providers publish them, or use a flattening service with automated regeneration.

Should I Use -all or ~all?

Use -all once you are confident every legitimate sender is listed, because it instructs receivers that unlisted sources are unauthorised. Use ~all during rollout while you verify the record from DMARC reports. A permanent soft fail is defensible only alongside DMARC enforcement, which supplies the policy regardless of the SPF qualifier.

Why Does SPF Fail When Mail Is Forwarded?

Forwarding changes the connecting server. The receiving system sees the forwarder’s address, which is not in your record, so the check fails even though the message is genuine. DKIM signatures usually survive forwarding, which is why DMARC passes when either mechanism aligns, and why ARC exists for mailing lists that modify the message.

Do I Need SPF on Domains That Send No Email?

Yes, and it is one of the simplest wins available. Publish v=spf1 -all on every parked, brand, or legacy domain you own, along with a DMARC record set to reject and a null MX record. There is no legitimate mail to break, and it removes those domains as spoofing targets at no operational cost.

Related Terms

You May Be Interested In These

What Is Jump List Analysis?

Cybersecurity Terms

17 November 2026

What Is Jump List Analysis?

Read More
What Is Breach and Attack Simulation?

Cybersecurity Terms

17 November 2026

What Is Breach and Attack Simulation?

Read More
What Is Post-Quantum Cryptography?

Cybersecurity Terms

17 November 2026

What Is Post-Quantum Cryptography?

Read More