SPF and DMARC record builder
Paste an SPF or DMARC record to see what each part does and what needs fixing, or build a new one below. The page reads only the text you give it and does not query DNS.
Explain a record
| Part | What it does |
|---|
Build an SPF record
List every system that sends mail using your domain in the From address. One domain has exactly one SPF record.
TXT record at the domain itself (host @)
v=spf1 ~all
Build a DMARC record
TXT record at host _dmarc
v=DMARC1; p=none
SPF reference
An SPF record is a TXT record on the domain that starts with v=spf1 and lists who may send mail for it. A receiver reads the parts from left to right and stops at the first match. Each mechanism can carry a qualifier in front: + pass (the default), - fail, ~ soft fail, ? neutral.
| Part | Matches | DNS lookup |
|---|---|---|
all | Every sender. Goes last, because nothing after it is read. | No |
ip4:, ip6: | One address or a range in CIDR form. | No |
a | The addresses the domain's A and AAAA records point to. a:other.example uses another name. | Yes |
mx | The addresses of the domain's mail servers. | Yes |
include: | Whatever the named domain's own SPF record allows. | Yes |
exists: | Any sender, if the named domain resolves. Used with macros. | Yes |
ptr | Senders whose reverse DNS name is in the domain. RFC 7208 says not to use it. | Yes |
redirect= | Hands the decision to another domain's record when nothing else matched. | Yes |
exp= | Names a TXT record whose text explains a failure to the sender. | No |
A receiver gives up with a permanent error after 10 DNS lookups, counting those inside every included record. A record with two v=spf1 TXT records on the same name is also a permanent error. A single string in a TXT record holds at most 255 characters; a longer record is split into several quoted strings that the receiver joins without adding spaces.
DMARC reference
A DMARC record is a TXT record at _dmarc. followed by the domain. It tells receivers what to do with mail that fails both SPF and DKIM alignment for the From domain, and where to send reports. The standard was revised in May 2026 as RFC 9989, which removed three tags and added three.
| Tag | Values | Meaning |
|---|---|---|
v | DMARC1 | Version. Must come first. |
p | none, quarantine, reject | Policy for the domain. |
sp | Same as p | Policy for subdomains. Defaults to p. |
np | Same as p | Policy for subdomains that do not exist in DNS. Defaults to sp. Added by RFC 9989. |
rua | mailto: addresses | Where daily aggregate reports go. |
ruf | mailto: addresses | Where per-message failure reports go. |
adkim | r, s | DKIM alignment: relaxed (default) accepts a subdomain, strict needs the same domain. |
aspf | r, s | SPF alignment, with the same two settings. |
fo | 0, 1, d, s | When to send a failure report: 0 when both checks fail (default), 1 when either fails, d on a DKIM failure, s on an SPF failure. |
t | y, n | Testing mode. t=y asks receivers not to enforce the policy yet. Added by RFC 9989 in place of pct. |
psd | y, n, u | Says whether the domain is a public suffix. Ordinary domains leave it out. Added by RFC 9989. |
pct | 0 to 100 | Share of failing mail the policy applied to. Removed by RFC 9989. |
rf, ri | Report format and report interval. Removed by RFC 9989. |
Reports can go to an address in another domain only if that domain agrees: it publishes a TXT record containing v=DMARC1 at yourdomain._report._dmarc.theirdomain. Report processing services set this up for their customers.
More Email and M365 tools
-
SMTP status code lookup
Read a bounce such as 550 5.7.1 or 421 4.4.2: the reply code and the enhanced code by class, subject and detail.
-
Email header analyzer
Paste message headers: each hop and its delay, SPF, DKIM and DMARC results, and Microsoft 365's SCL, BCL and SFV in words.
-
AADSTS error code lookup
Look up AADSTS50126, AADSTS700016 or any other Microsoft Entra sign-in error, alone or in a pasted message.
-
JWT and access token decoder
Read the claims of a Microsoft Entra access or ID token, with exp, iat and nbf as dates, in your browser.
-
dsregcmd /status reader
Paste the output of dsregcmd /status: the join state, each field in words, and the values that point at a problem.
-
Intune and Autopilot error codes
App install codes such as 0x87D1041C, MDM enrollment errors such as 0x8018000A, and Autopilot import errors 806 and 808.
-
Safe Links and URL Defense decoder
See the address inside a Microsoft Safe Links or Proofpoint URL Defense link as plain text, without opening it.
-
Punycode and lookalike checker
Convert xn-- names to Unicode and back, and see when a name mixes scripts or has letters that look like ASCII ones.
-
DKIM record checker
Check a DKIM key record: key type and length, flags and mistakes, with a long key split into 255-character strings.
-
DMARC report viewer
Open DMARC aggregate reports (.xml, .gz or .zip) in your browser: senders, counts, and SPF and DKIM alignment.
-
MTA-STS and TLS-RPT builder
Build the MTA-STS and TLS-RPT records and the policy file, or paste one to read it.