How to set up a DMARC record for your domain
A step-by-step walk from a blank DNS panel to a published DMARC record. Start at p=none, get reports flowing, then move toward enforcement.
You set up a DMARC record by adding one line of text to your domain's DNS. It is a TXT record. It tells the servers that receive your mail how to handle messages from your domain that do not pass SPF or DKIM. This guide walks you from a blank DNS panel to a published record, then through the weeks after you publish it. If you use Google Workspace, you do not need to change anything in your Admin console. The record lives in DNS, not in Google's settings. See DMARC for Google Workspace for that path in detail.
Why DMARC is the third record you set up
SPF and DKIM come first. DMARC's standard says a mail receiver that wants to take part should already be checking SPF and DKIM. DMARC sits on top of them. According to Gmail's guidelines, DMARC instructs receiving servers on handling messages that fail SPF or DKIM. Without SPF and DKIM, there is nothing for DMARC to check. Read how SPF, DKIM and DMARC fit together if you want the full picture.
What you need before you start
You need three things. First, a domain you control. Second, access to that domain's DNS panel at your domain host. Third, working SPF and DKIM. Google Workspace Help says you must turn on SPF or DKIM for your domain before you can use DMARC. If you have not done that yet, start with the SPF record and the DKIM setup guide.
The DMARC record itself
Here is a copy-ready record to start with:
v=DMARC1; p=none; rua=mailto:dmarc-feedback@example.com
Replace yourdomain.com with your own domain. Each part is a tag.
The v tag is required and must be DMARC1. DMARC's standard says the v tag must be the first tag in the record. If it is not first, is missing, or has the wrong value, the whole record must be ignored.
The p tag is required. According to Google Workspace Help, it instructs the receiving mail server on how to handle messages that fail authentication. The value none takes no action and delivers the message. The value quarantine treats the mail as suspicious. The value reject means the domain owner sees the failure as clear proof the domain use is not valid. A record without a p tag is treated as if it said p=none.
The rua tag sends DMARC reports to an email address. The address needs the mailto prefix in front of it, like mailto:dmarc-feedback@example.com. Without the mailto prefix, reports will not arrive. See the rua tag explained for more.
Two optional tags control alignment. The adkim tag sets how strictly message information must match DKIM signatures. The aspf tag does the same for SPF. Both default to relaxed, which accepts any valid subdomain of the matching domain. The standard says that in practice nearly all Domain Owners have found relaxed alignment sufficient to meet their needs. Strict alignment can send messages from your own subdomains to spam. Consider strict only if mail goes out under your domain from a subdomain you do not control. The alignment guide covers this choice.
Where the record goes
The record type is TXT. The host value is _dmarc followed by your domain name, so for example.com the full name is _dmarc.example.com.
Here is the gotcha that breaks many setups. Google Workspace Help says some domain hosts automatically add the domain name to the record. If your host behaves this way, entering _dmarc.example.com as the host produces _dmarc.example.com.example.com, a name no server will ever look up. In that case, type only _dmarc as the host. After you add the record, check what the host saved. If your record does not show up in lookups later, this doubled name is the first thing to check. See DMARC record not found.
Getting reports
The rua tag is where reports go. Google recommends you always include it, even though it is optional. DMARC's standard says mail receivers must not make aggregate reports if the rua tag is missing, so without it you learn nothing.
Where should reports go? Google Workspace Help recommends a dedicated mailbox, a group, or a third-party service rather than your own email address. DMARC's standard recommends that aggregate reports be machine-parsed rather than read by a human. A DMARC report service turns them into tables you can act on.
Before reports can go to an address on another domain, that email domain's DNS needs a TXT record added to it. That record gives the other domain permission to receive reports about yours.
One more thing. Gmail does not support the ruf tag, which is used to send failure reports. Do not build your monitoring plan around ruf.
Why you begin with p=none
Google Workspace Help recommends setting the policy to none when you start using DMARC. DMARC's standard calls this putting the domain into Monitoring Mode. The policy for the domain and all its subdomains is p=none while you receive aggregate reports.
Starting at none makes sure nothing was missed in your initial SPF and DKIM deployments. The reports list every source sending mail under your domain, even the ones you did not remember. A stream that fails could be someone spoofing you, or it could be real mail of yours that is not properly aligned. You cannot tell the difference from your desk. The reports can.
Adding the record, step by step
The exact steps vary by domain host, but the shape is the same everywhere.
- Sign in to your domain host's DNS panel.
- Choose to add a new record, and pick TXT as the type.
- In the host field, enter _dmarc, or _dmarc.yourdomain.com if your host does not append the domain itself.
- In the value field, paste the record from above with your own rua address.
- Save, then check the saved host name. If the domain appears twice, edit the host down to _dmarc.
- Wait for DNS to update, then run a lookup for _dmarc.yourdomain.com to confirm the record answers.
Setting up DMARC for more than one domain
Each domain gets its own record. Google Workspace's help page says each domain can have a different DMARC policy and different report options. Work through the setup process for every domain. Yahoo's guide strongly urges all senders to publish a DMARC policy for each domain that sends mail.
Subdomains inherit the parent domain's policy when the sp tag is not used. To give subdomains their own policy, use the sp tag. It is written the same way as p. The subdomain policy guide covers this.
What to do after you publish
Publishing the record is the start, not the end. Here is the path from monitoring to enforcement.
Read the reports first. DMARC's standard says a domain owner starting at p=none uses aggregate reports to audit its own mail streams. Look for any messages sent using your domain that do not pass the DMARC check.
Fix your legitimate streams next. According to the standard, problems in your legitimate mail streams need correcting before an enforcement policy goes live. That means updating SPF to include every real sender, and turning on DKIM for every sending service.
Then move toward enforcement. Go from p=none to quarantine, which marks failures as spam, and then to reject. Move one step at a time, and read the reports after each change. Choosing a p value involves tradeoffs that can cause problems for mailing lists and legitimate mail. Do not jump straight to reject on day one. The policy options guide compares the values, and p=none explains the monitoring stage in full.
Under enforcement, a domain and its subdomains can only be used as Author Domains if they pass DMARC validation. Receivers can then take your policy into account when they handle spoofed mail that claims to be you. That is the goal, and the reports are how you get there safely.
Sources
Filed