[Articles](https://mailglo.com/articles/)

For AI agents: [llms.txt, the index of guides and public pages](https://mailglo.com/llms.txt)

# SPF in RFC 7208: what the standard requires

RFC 7208 tells you how to publish an SPF record and how mail servers check it.

## What does RFC 7208 require?

"MUST" in the standard marks a requirement. What breaking one does depends on the rule.

| Rule | What RFC 7208 says | Section |
|---|---|---|
| A TXT record only | "SPF records MUST be published as a DNS TXT (type 16) Resource Record (RR) [RFC1035] only." | [3.1](https://www.rfc-editor.org/rfc/rfc7208#section-3.1) |
| One record per name | "A domain name MUST NOT have multiple records that would cause an authorization check to select more than one record." Two records give "permerror". | [3.2](https://www.rfc-editor.org/rfc/rfc7208#section-3.2), [4.5](https://www.rfc-editor.org/rfc/rfc7208#section-4.5) |
| Long records are split into strings | Strings in one record "MUST be treated as if those strings are concatenated together without adding spaces". | [3.3](https://www.rfc-editor.org/rfc/rfc7208#section-3.3) |
| No syntax errors | With "any syntax errors anywhere in the record", the check returns "permerror" without reading further. | [4.6](https://www.rfc-editor.org/rfc/rfc7208#section-4.6) |
| At most 10 lookup terms | See [the 10-lookup limit](https://mailglo.com/articles/spf-lookup-limit/), which also covers the limits for `mx` and `ptr`. | [4.6.4](https://www.rfc-editor.org/rfc/rfc7208#section-4.6.4) |
| `all` beats `redirect` | See [include and redirect](https://mailglo.com/articles/spf-include-redirect/#what-does-the-standard-say-about-redirect). | [6.1](https://www.rfc-editor.org/rfc/rfc7208#section-6.1) |

One string holds at most 255 characters, which is why long records are split. A DNS host that shows your record as `"v=spf1 ... ip4:192.0.2.1" "0 -all"` publishes `ip4:192.0.2.10`, with no space between the parts.

## Which rules are only recommendations?

"SHOULD" is a strong recommendation: a receiver or a domain owner may have a reason not to follow it. The last row is plainer advice, not a SHOULD.

| Recommendation | What RFC 7208 says | Section |
|---|---|---|
| Keep the record small | The record "SHOULD remain small enough that the results of a query for it will fit within 512 octets." The guideline is 450 octets for the domain name and all its TXT records together. | [3.4](https://www.rfc-editor.org/rfc/rfc7208#section-3.4) |
| Stop after two lookups that find nothing | See [void lookups](https://mailglo.com/articles/spf-void-lookups/). | [4.6.4](https://www.rfc-editor.org/rfc/rfc7208#section-4.6.4) |
| Don't use `ptr` | "This mechanism SHOULD NOT be published." | [5.5](https://www.rfc-editor.org/rfc/rfc7208#section-5.5) |
| Put `redirect` last | See [include and redirect](https://mailglo.com/articles/spf-include-redirect/#what-does-the-standard-say-about-redirect). | [6.1](https://www.rfc-editor.org/rfc/rfc7208#section-6.1) |
| End the record on purpose (advice) | "It is better to use either a "redirect" modifier or an "all" mechanism to explicitly terminate processing." Without one, the record ends as if it had `?all`. | [4.7](https://www.rfc-editor.org/rfc/rfc7208#section-4.7) |

Count every TXT record at the name toward the 450, not only SPF. That includes verification codes.

## What does it leave to receivers?

Mostly, what happens to the message. In the standard's words, "there is no comprehensive normative requirement for message handling in response to any particular result" ([section 8](https://www.rfc-editor.org/rfc/rfc7208#section-8)). A receiver decides for itself whether to refuse mail that gets "fail".

Two results have rules anyway:

- "neutral" "MUST be treated exactly like the "none" result" ([section 8.2](https://www.rfc-editor.org/rfc/rfc7208#section-8.2)).
- On "softfail", receivers "SHOULD NOT reject the message based solely on this result" ([section 8.5](https://www.rfc-editor.org/rfc/rfc7208#section-8.5)).

If your domain has a [DMARC](https://mailglo.com/articles/dmarc/) record, its policy applies only to mail that fails DMARC. Mail that fails SPF can still pass DMARC through an aligned DKIM signature.

MailGlo can't tell you how a given receiver treats your SPF result. That receiver's headers, logs or DMARC reports show it.

## Is RFC 7208 still current?

Yes. It was published in April 2014 as a Proposed Standard and replaced RFC 4408. Three later RFCs update it without changing these rules. For a practice the standard doesn't name, see [flattening](https://mailglo.com/articles/spf-flattening/).

## Which of these rules can a check test?

The free [SPF checker](https://mailglo.com/tools/spf-checker/) can show a lookup count; [the 10-lookup limit](https://mailglo.com/articles/spf-lookup-limit/#check-your-record) says what that count tells you. It also flags a name receivers can't follow. It doesn't measure record size or tell you whether `redirect` comes last. [SPF](https://mailglo.com/articles/spf/) explains what SPF does for your mail.

## Sources

- [RFC 7208](https://www.rfc-editor.org/rfc/rfc7208), sections 3.1 to 3.4, 4.5 to 4.7, 5.5, 6.1, 8, 8.2 and 8.5, the rules and recommendations quoted above.
- [RFC 7208 at the RFC Editor](https://www.rfc-editor.org/info/rfc7208), its status and the RFCs that update it.

Last updated 3 Dec 2026: New article: the SPF rules in RFC 7208, what it requires, what it recommends and what it leaves to receivers.

Found an error, or a question this page does not answer? Email support@mailglo.com.
