by Ozlem Yildirimer · Last updated: 2026-09-25SPF, DKIM and DMARC are three DNS TXT records. SPF sits at your domain root, starts with v=spf1, lists allowed senders, and ends with an all qualifier like ~all or -all. DKIM lives at selector._domainkey and carries a public key. DMARC lives at _dmarc and needs only v=DMARC1 plus a p= policy.
Each record has its own tag vocabulary, and a single wrong character, a stray space, a second SPF record, an extra lookup, can silently break authentication. Below is every tag and mechanism for all three records, with the exact syntax, allowed values, a copy-paste example, and the RFC that defines it.
New here? Start with our primer on Email Deliverability & Authentication for the fundamentals, then come back to this guide.
Quick context: Mailsoftly offers transparent pricing, free hands-on migration, and human support. 500 contacts and 2,000 emails per month, no credit card.
Start free with Mailsoftly →
Key Takeaways
v=spf1 and ending in an all qualifier, capped at 10 DNS lookups (RFC 7208).selector._domainkey.yourdomain.com; the p= tag holds the key itself (RFC 6376).v=DMARC1 and p=; the policy choices are none, quarantine, and reject (RFC 7489).v= version tag.An SPF record is a single DNS TXT record at your domain root that begins with v=spf1, lists the servers allowed to send on your behalf using mechanisms like include:, ip4:, ip6:, a and mx, and finishes with an all mechanism carrying a qualifier. The record must resolve within 10 DNS lookups or receivers return a permerror.
Each mechanism can take a qualifier prefix: + pass (the default), - fail, ~ softfail, and ? neutral. In practice the only one most senders write explicitly is the qualifier on the final all: use -all to hard-fail unlisted sources or ~all to soft-fail them while you monitor. Here is every SPF mechanism and modifier defined in RFC 7208.
| Mechanism / tag | Meaning | Allowed values | Example | Source |
|---|---|---|---|---|
v=spf1 | Version tag. Must be the first token. | Exactly spf1 | v=spf1 ... | RFC 7208 |
ip4: | Authorizes an IPv4 address or range. | Address or CIDR | ip4:198.51.100.0/24 | RFC 7208 |
ip6: | Authorizes an IPv6 address or range. | Address or CIDR | ip6:2001:db8::/32 | RFC 7208 |
a | Authorizes the A/AAAA record hosts of a domain. | Optional domain and prefix | a:mail.example.com | RFC 7208 |
mx | Authorizes the domain’s MX hosts. | Optional domain and prefix | mx | RFC 7208 |
include: | Imports another domain’s SPF policy (each counts toward the 10-lookup limit). | A domain | include:_spf.google.com | RFC 7208 |
all | Matches everything; always last, with a qualifier. | + - ~ ? | -all | RFC 7208 |
redirect= | Modifier. Replaces the record with another domain’s policy. | A domain | redirect=_spf.example.com | RFC 7208 |
exp= | Modifier. Points to an explanation string for failures. | A domain | exp=explain.example.com | RFC 7208 |
Here is a complete SPF record example for a domain that sends through Google Workspace and one additional IP block:
Name: example.com
Type: TXT
Value: v=spf1 include:_spf.google.com ip4:198.51.100.0/24 ~allFor provider-specific include: values, use the string your mailbox host documents: Google Workspace publishes _spf.google.com, and Microsoft 365 publishes spf.protection.outlook.com on their own setup pages. You can validate the finished record against the 10-lookup ceiling with our SPF, DKIM and DMARC checker before you publish.
Read enough? Try Mailsoftly free with 500 contacts and 2,000 emails per month, no credit card.Start free with Mailsoftly →
A DKIM record is a TXT record published at selector._domainkey.yourdomain.com, where the selector is a label your sending platform assigns. The record value starts with v=DKIM1 and carries your public key in the p= tag. Receivers use that key to verify the cryptographic signature your outbound mail server adds to each message header.
Only v= and p= are commonly used, but RFC 6376 defines several optional tags that tune how receivers treat the key. The table below lists each one. The selector matters as much as the value: if your platform signs with selector ms1, the record must live at ms1._domainkey.yourdomain.com exactly.
| Tag | Meaning | Allowed values | Example | Source |
|---|---|---|---|---|
v= | Version. Optional, but if present must be first. | DKIM1 | v=DKIM1 | RFC 6376 |
k= | Key type. | rsa, ed25519 | k=rsa | RFC 6376 |
p= | The public key (base64). An empty p= revokes the key. | Base64 string | p=MIGfMA0GCSq... | RFC 6376 |
t= | Flags. y means testing mode; s enforces exact domain match. | y, s | t=s | RFC 6376 |
s= | Service type this key is valid for. | * or email | s=email | RFC 6376 |
h= | Acceptable hash algorithms. | sha256, sha1 | h=sha256 | RFC 6376 |
n= | Human-readable notes for admins. | Free text | n=rotated 2026 | RFC 6376 |
Here is a DKIM TXT record example, truncated for readability. The real p= value is a long base64 string your provider generates for you:
Name: ms1._domainkey.example.com
Type: TXT
Value: v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7...IDAQABBecause most DNS hosts cap a single TXT string at 255 characters, a 2048-bit key is often split into quoted chunks that the resolver concatenates. Paste the full key your platform gives you without adding spaces or line breaks inside the base64, or verification fails even though the record “looks” present.
A DMARC record is a TXT record at _dmarc.yourdomain.com that must begin with v=DMARC1 and include a policy tag p=. Everything else is optional. The policy tells receivers what to do with mail that fails both SPF and DKIM alignment, and the reporting tags tell them where to send the data you use to tune it.
Below is every DMARC tag defined in RFC 7489. One note on pct=: the IETF’s DMARCbis work, the successor to RFC 7489, deprecates the pct tag. Until DMARCbis is finalized, major receivers still honor pct=, but treat it as a transitional tag and avoid building long-term policy around partial percentages.
| Tag | Meaning | Allowed values | Example | Source |
|---|---|---|---|---|
v= | Version. Required, must be first. | DMARC1 | v=DMARC1 | RFC 7489 |
p= | Policy for the domain. Required. | none, quarantine, reject | p=none | RFC 7489 |
sp= | Policy for subdomains. | none, quarantine, reject | sp=reject | RFC 7489 |
rua= | Address for aggregate (daily) reports. | mailto: URI list | rua=mailto:[email protected] | RFC 7489 |
ruf= | Address for forensic (per-failure) reports. | mailto: URI list | ruf=mailto:[email protected] | RFC 7489 |
adkim= | DKIM alignment mode. | r relaxed, s strict | adkim=s | RFC 7489 |
aspf= | SPF alignment mode. | r relaxed, s strict | aspf=s | RFC 7489 |
pct= | Percent of mail the policy applies to. Deprecated in DMARCbis. | 0 to 100 | pct=100 | RFC 7489 |
fo= | Forensic reporting options. | 0, 1, d, s | fo=1 | RFC 7489 |
rf= | Forensic report format. | afrf | rf=afrf | RFC 7489 |
ri= | Aggregate report interval in seconds. | Integer (default 86400) | ri=86400 | RFC 7489 |
Here is a DMARC record example that starts in monitor mode and collects reports, the safe way to begin:
Name: _dmarc.example.com
Type: TXT
Value: v=DMARC1; p=none; rua=mailto:[email protected]; adkim=s; aspf=sFor the broader picture on this topic, see our complete Email Deliverability & Authentication guide, which covers strategy, fundamentals, and advanced playbooks.
Start at p=none to observe without affecting delivery, move to p=quarantine to divert failing mail to spam once your reports are clean, and finish at p=reject to block spoofed mail outright. The policy is only enforced on messages that fail both SPF and DKIM alignment, so tighten alignment first and escalate the policy second.
| Policy | What receivers do | Use it when |
|---|---|---|
p=none | Deliver as normal, send you reports only. | You are measuring who sends as your domain. Monitoring stage. |
p=quarantine | Route failing mail to the spam or junk folder. | Reports are clean and you want a safety margin before full enforcement. |
p=reject | Refuse failing mail at the gateway; it never arrives. | All legitimate streams pass alignment. This is the enforcement goal. |
Bulk senders are now pushed toward enforcement: large mailbox providers expect a published DMARC policy for high-volume domains, which is one reason moving past p=none matters. Our breakdown of how Mailsoftly handles authentication and sending walks through aligning SPF and DKIM so you can escalate your DMARC policy without stranding real mail.
Last checked: 2026-10-18. SPF values verified against RFC 7208, DKIM against RFC 6376, and DMARC against RFC 7489, with the DMARCbis pct deprecation noted above.
The three breakages that account for most authentication failures are a second SPF record on the same domain, more than 10 DNS lookups in SPF, and a missing version tag. All three produce silent failures: the record exists, but receivers treat it as invalid.
v=spf1 TXT record. Two records return a permerror and SPF is ignored entirely. Merge every sender into a single record.include:, a, mx, redirect= and similar mechanism costs a lookup, capped at 10 by RFC 7208. Flatten or consolidate includes when you approach the limit.v=spf1 and DMARC with v=DMARC1. Without the version token the record is not recognized as an SPF or DMARC policy at all.selector._domainkey means receivers never find it. The selector in DNS must match the one your platform signs with.p= key corrupt it. Paste it exactly as generated.If you would rather have these generated and validated for you instead of hand-editing DNS, Mailsoftly’s domain setup walks you through publishing all three records with the correct selectors and includes, then confirms each one resolves before you send.
No. A domain may publish exactly one SPF (v=spf1) TXT record. If two exist, receivers return a permanent error and skip SPF entirely. Combine every authorized sender, including both your mailbox host and any marketing platform, into a single record using multiple include: and ip4: mechanisms.
v=DMARC1; p=none is a monitoring-only DMARC policy. It asks receivers to take no action against mail that fails authentication while still sending you aggregate reports through the rua= address. It is the recommended starting point so you can see every source sending as your domain before you enforce quarantine or reject.
A DKIM record is a TXT record at selector._domainkey.yourdomain.com, where the selector is the label your sending platform assigns (for example ms1._domainkey.example.com). It is not published at the domain root. The selector in DNS must match the selector your server uses to sign outbound mail, or verification fails.
SPF allows a maximum of 10 DNS lookups during evaluation, as defined in RFC 7208. Each include:, a, mx, ptr, exists and redirect mechanism counts toward that limit. Exceeding 10 returns a permerror and SPF is treated as failed, so keep includes lean.
Effectively, yes. SPF and DKIM prove a message is authorized and unaltered, and DMARC tells receivers how to handle failures and reports back to you. Major mailbox providers expect authenticated mail from any serious or bulk sender, so publishing all three is the baseline for consistent inbox placement.
Ready to switch?Start free with Mailsoftly →
500 contacts, 2,000 emails per month. Free hands-on migration. No credit card.

Ready to boost your email marketing?
Send beautiful, targeted emails that convert. Free plan available, paid plans from $15 a month.
Try Mailsoftly FreeNo credit card required