TXT vs SPF Records
People often ask whether to publish their SPF policy as a TXT record or an SPF record, and the answer surprises many: there is really only one correct choice. SPF is published as a TXT record. A dedicated SPF record type once existed, but it was deprecated, leaving TXT as the single way email providers actually read your policy. Here is why, and what else TXT records carry.
The common confusion
Many DNS providers still offer an SPF record type in their dropdown alongside TXT, which makes it look like you have a genuine choice when publishing an SPF policy. You do not. The dedicated SPF record type was deprecated years ago, and mail receivers read SPF exclusively from TXT records. Choosing the SPF type can mean your policy is simply never seen.
What TXT records are
A TXT record holds arbitrary text associated with a name. It was designed as a general-purpose record, and over time it became the standard home for machine-readable policy strings that other systems look up:
Because TXT is flexible and universally supported, standards bodies kept reusing it rather than minting new record types for every new use.
Why SPF is published as a TXT record
When SPF was first standardized, it came with its own dedicated record type alongside the option to use TXT. In practice almost everyone published TXT, supporting both added complexity, and RFC 7208 formally deprecated the standalone SPF record type. Since then, the rule is simple: publish your SPF policy as a TXT record at your apex and nothing else.
An SPF TXT record starts with v=spf1 and lists the mechanisms that authorize senders, ending with an all qualifier such as -all or ~all. For a full walkthrough, see how to set up SPF.
Other TXT uses
SPF is only one of many things that ride on TXT records:
- DKIM — the public key for verifying signatures is a TXT record at
selector._domainkey.yourdomain. - DMARC — the policy is a TXT record at
_dmarc.yourdomain. - Domain verification — services like Google and Microsoft ask you to publish a TXT token to prove ownership.
In every case the pattern is the same: a system needs to read a string from DNS, so it uses a TXT record rather than a bespoke type.
At a glance
| TXT record | SPF record type | |
|---|---|---|
| Status | Current and supported | Deprecated |
| Read by mail receivers | Yes | No |
| Holds an SPF policy | Yes | Was intended to |
| Other uses | DKIM, DMARC, verification | None |