The DMARC TXT Record, Tag by Tag
A DMARC TXT record is one line of text at _dmarc.yourdomain. Here is what each tag means and how to build your first record.
A DMARC TXT record is one line of text in your DNS. It tells receiving mail servers what to do with messages from your domain that fail SPF or DKIM authentication. Google Workspace Help says DMARC tells receiving email servers what action to take on messages from your domain that fail SPF or DKIM authentication. The whole policy fits in a single string. This guide walks through it tag by tag, so you can build your own record.
What a DMARC TXT record is
DMARC Policy Records are stored as DNS TXT records with names starting with the label _dmarc. That is the whole shape of the thing. There is no special record type. You publish ordinary DNS text, and receivers read it before deciding what to do with your mail.
A domain owner can choose not to take part in DMARC by simply not publishing a DMARC Policy Record. Nothing forces you. But Yahoo's guide strongly urges all senders to publish a DMARC policy for each domain that sends mail, so publishing one is the default move.
Where the record lives in DNS
The host value is _dmarc followed by your domain name. For example, if your domain is yourdomain.com, the record lives at _dmarc.yourdomain.com. Google Workspace Help says the DMARC record host value should be _dmarc followed by your domain name.
Watch for one trap. Google Workspace Help says some domain hosts automatically add the domain name, so verify the domain name in the DMARC record after adding it. If your host appends the domain and you type the full name anyway, you get _dmarc.yourdomain.com.yourdomain.com. Receivers will not find your policy. After you save, check what the host field actually says.
If a TXT record holds multiple character strings, the module doing DMARC evaluation must join them in order and parse them as one string. So a record split across strings still works, but most hosts let you enter it as one line, and one line is easier to check.
The required tags: v and p
Two tags are required. The v tag marks the record as a DMARC Policy Record, and the standard says it must be the first tag in the record. The only value it can have is DMARC1. If the v tag is not first, is missing, or has the wrong value, the whole record must be ignored. So a record that starts with p= instead of v= is dead on arrival.
The p tag states the domain owner's preference for handling mail that fails DMARC validation. Per Google Workspace Help, the p tag tells the receiving mail server how to handle messages that fail authentication. If you leave out the p tag, receivers read the record as p equals none. Spell the tag out anyway. Being explicit helps you and helps anyone reading the record later.
The p values: none, quarantine, reject
The p tag has three values, and each one is a statement about how you want failures handled.
- p=none expresses no preference from the owner. Per Google Workspace Help, receivers take no action and the message reaches its recipient.
- p=quarantine asks receivers to handle failing mail as suspect. For the sp value quarantine, Google Workspace Help says messages are marked as spam and delivered to the spam folder.
- p=reject tells receivers the owner regards a failure as proof the use of the domain is not valid. Per Google Workspace Help, the message is rejected, and the receiving server usually returns a bounce to the sender.
Each value has its own page if you want the full picture: p=none, quarantine, and reject. The short version of the choice between them lives under DMARC policy options.
The rua tag: where aggregate reports go
The rua tag lists the addresses that receive aggregate feedback reports. RFC 9989 lists rua as the reporting URIs for aggregate feedback reports with an active status. The tag is optional, but Google recommends you always include it, and Yahoo's guide says including a rua tag, properly set up to receive reports, is strongly recommended to allow monitoring during initial setup.
The address must include the mailto prefix. Google Workspace Help says DMARC report email addresses must include mailto, so the value looks like rua=mailto:dmarc-feedback@example.com, not just the bare address. The standard says a mail receiver that sends aggregate reports must support a mailto URI, which is why the prefix is there.
Where should the reports land? Google recommends a dedicated mailbox, a group, or a third-party service instead of your own email address. Reports arrive as XML attachments and pile up fast, so a group or a report service beats your personal inbox. The standard recommends that aggregate reports be machine-parsed rather than read by a human.
One cross-domain rule trips people up. Google Workspace Help says sending DMARC reports to an address in a different domain requires adding a TXT record to that email domain's DNS. Without that record, the other domain has not agreed to receive your reports, and receivers will not send them. If your reports go to a third-party service, that service will tell you what TXT record to add.
If the rua tag is missing, mail receivers must not make aggregate reports. So a record without rua gives you no visibility at all. More on what the reports contain is on the DMARC report page.
Subdomain and alignment options
Three more tags shape how the policy applies. Each has a dedicated page, so this is the short version.
The sp tag carries the policy that applies to subdomains under the organizational domain. The organizational domain itself is outside its scope, and you write it with the same syntax as p. Subdomains inherit the parent domain's DMARC policy when sp is absent, so you only need sp if you want subdomains treated differently. See DMARC for subdomains.
The adkim tag says whether the domain owner requires strict or relaxed DKIM alignment. Relaxed DKIM alignment is the default and accepts any valid subdomain of the d= domain in the DKIM mail headers. aspf is the SPF counterpart. Relaxed SPF alignment is the default and lets any valid subdomain of the domain name match. Google suggests strict alignment when mail is sent for your domain from a subdomain outside your control. Relaxed alignment usually gives enough spoofing protection. Strict alignment can send mail from your own subdomains to spam. The details are under alignment.
A receiver that meets a tag it does not know has to ignore it, so one unknown tag cannot sink the record. The full tag list is on the DMARC tags page.
A sample DMARC record to start with
Here is a DMARC record example that fits most domains on day one:
v=DMARC1; p=none; rua=mailto:dmarc-feedback@example.com
That is the whole record. Per the standard, the usual starting point is p=none plus a rua tag aimed at the mailbox that takes the aggregate reports. The standard's name for that starting state is Monitoring Mode for the Author Domain. Starting at p=none makes sure nothing was missed in the initial SPF and DKIM deployments. You then use the aggregate reports to audit your own mail streams. Fix whatever is wrong in your legitimate mail streams first. Only then should you move to an Enforcement policy.
Google Workspace Help also recommends setting the p option to none when you start. The standard and Google agree on the starting point.
How to add the record at your domain host
Google Workspace Help says steps for adding a DMARC record vary depending on the domain host, so the exact clicks differ. The outline of the work is the same at any host.
- Go to your domain host's DNS settings.
- Add a TXT record.
- In the host or name field, enter _dmarc. Use _dmarc.yourdomain.com if your host expects the full name.
- Paste the record string into the value field.
- Save, then verify the domain name in the record. Check for the auto-append trap described above.
If you run Google Workspace, you don't need to do anything in your Google Admin console to set up DMARC. The record lives in DNS, not in the console. The Google Workspace DMARC page covers that setup in full.
If you have more than one sending domain, each domain can have a different DMARC policy and different report options. Google Workspace's help page says to complete the setup steps for each domain. A Domain Owner who fully participates publishes a record for each Author Domain and its Organizational Domain. When the Organizational Domain and the Author Domain are not the same, publish a record for the Organizational Domain too.
Before you publish: SPF and DKIM come first
You must turn on SPF or DKIM for your domain before you can use DMARC. Google Workspace Help says to set up DKIM and SPF before setting up DMARC. Gmail's guidelines say messages must pass SPF or DKIM, or both. The authenticating domain must match the From: header domain.
A message passes DMARC if it passes SPF authentication with SPF alignment or DKIM authentication with DKIM alignment. It fails the DMARC check if it fails both. So DMARC sits on top of the other two. A quarantine or reject record published over broken SPF and DKIM asks receivers to treat your real mail as failing. Start with the SPF record and DKIM record pages, or see how SPF, DKIM and DMARC fit together.
One more thing if you use BIMI. Google Workspace Help says the DMARC p option must be set to quarantine or reject. A domain using BIMI must also have a pct value of 100. So a BIMI domain cannot stay at p=none forever. See the BIMI page for that path.
Publish the record, let the reports run, and fix what they show before you tighten the policy.
Sources
Filed