To set up DMARC, publish a TXT record at _dmarc.yourdomain.com with v=DMARC1; p=none; rua=mailto:..., collect aggregate reports for a few weeks, make every legitimate sender pass SPF or DKIM with an aligned domain, then raise the policy to p=quarantine and finally p=reject. The record itself takes five minutes. The work is in the middle step, and doing it in order is what keeps your own mail from being blocked.
Before you start
You need three things:
- Access to your DNS. Wherever your domain's records are hosted (registrar, DNS provider or CDN).
- A list of the services that send mail as your domain. Your mailbox provider, marketing platform, CRM, help desk, billing system, website forms. You will not know all of them yet. The reports will find the rest.
- A mailbox or tool to receive reports. Aggregate reports arrive as compressed XML attachments, often dozens per day for an active domain. A dedicated address such as
dmarc@example.comkeeps them out of someone's inbox.
Check what already exists before adding anything. Run a full domain scan or look up each record individually with the SPF checker, DKIM checker and DMARC checker. A domain can only have one DMARC record, and adding a second one invalidates both.
Step 1: Make sure SPF and DKIM are in place
DMARC passes when SPF or DKIM passes with a domain aligned to the visible From address. If neither is configured, every message fails.
SPF
Publish one SPF TXT record at the root of the domain that lists your senders:
example.com. IN TXT "v=spf1 include:_spf.google.com include:sendgrid.net -all"
Keep it under the 10 DNS lookup limit defined in RFC 7208. Past that, SPF returns a permanent error and stops counting as a pass. The SPF guide explains how to count lookups.
DKIM
Turn on DKIM signing in each sending service. Each one gives you a selector and either a public key (TXT) or a CNAME to publish:
s1._domainkey.example.com. IN CNAME s1.domainkey.u1234.wl.sendgrid.net.
The signature must use your domain (d=example.com or a subdomain of it), not the vendor's default domain. That is what makes DKIM align. See what is DKIM for selectors and key sizes.
Step 2: Publish a monitoring record (p=none)
Create a TXT record:
| Field | Value |
|---|---|
| Type | TXT |
| Name / Host | _dmarc (some providers want _dmarc.example.com) |
| Value | v=DMARC1; p=none; rua=mailto:dmarc@example.com |
| TTL | 3600 or your provider's default |
Result in DNS:
_dmarc.example.com. 3600 IN TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.com"
p=none tells receivers not to change how they handle failing mail. Nothing gets blocked. Its only job at this stage is to switch on reporting. The DMARC generator builds this record for you and checks the syntax.
Sending reports to another domain
If the rua address is at a different domain, for example a reporting service at reports.example.net, receivers must confirm that domain agrees to receive your reports. The receiving domain publishes a TXT record:
example.com._report._dmarc.reports.example.net. IN TXT "v=DMARC1"
Without it, receivers that follow the specification drop that destination. Reporting tools usually publish this for you.
Should I add ruf?
Optional. Failure reports (ruf) contain details of individual failing messages, but most large receivers do not send them because of privacy concerns, as the revised specification RFC 9989 itself notes. Aggregate reports are what you will actually rely on.
Step 3: Read the reports and inventory your senders
Give it at least two to four weeks. Many senders run on monthly cycles (invoices, statements, newsletters), and you want to see all of them. Large receivers usually send one report per day covering a UTC day.
For each source in the reports, decide which group it belongs to:
| Group | Example | Action |
|---|---|---|
| Legitimate, aligned | Your mailbox provider signing with d=example.com |
Nothing to do |
| Legitimate, not aligned | A CRM sending with its own bounce domain and its own DKIM domain | Fix (Step 4) |
| Forwarded | A university alumni address forwarding to Gmail | Usually tolerable, depends on DKIM surviving |
| Unknown or malicious | IPs in a hosting range you never use | Leave failing; enforcement will stop them |
The aggregate reports guide shows how to read the XML and how to tell these apart.
Step 4: Fix each legitimate sender
For every legitimate source that fails, get at least one aligned pass. DKIM is the better target because it survives forwarding.
Option A: aligned DKIM (preferred)
In the vendor's settings, add your domain as a sending or authenticated domain and publish the DKIM records they give you. Afterwards, check a message header:
DKIM-Signature: v=1; a=rsa-sha256; d=example.com; s=s1; ...
Authentication-Results: mx.receiver.example;
dkim=pass header.d=example.com;
spf=pass smtp.mailfrom=bounces.vendor.example;
dmarc=pass header.from=example.com
DKIM passed with d=example.com, which matches the From domain. DMARC passes even though SPF is aligned to the vendor.
Option B: aligned SPF
Some vendors let you set a custom return path (also called bounce domain or envelope sender), such as bounce.example.com, via a CNAME or MX record. Under relaxed alignment, bounce.example.com aligns with example.com. Add the vendor's include to the SPF record of that subdomain, or follow their instructions.
Option C: move or retire the sender
If a service cannot authenticate as your domain at all, send from a subdomain dedicated to it (with its own SPF, DKIM and DMARC), or stop using it for mail from your main domain.
Repeat until the share of legitimate mail that passes DMARC is close to 100 percent. Reports from the following week confirm each fix.
Step 5: Move to p=quarantine
Once legitimate traffic passes, change the policy:
_dmarc.example.com. IN TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com"
Receivers will now usually deliver failing mail to spam or junk. Watch reports and internal complaints for a week or two.
Ramping up with pct or t
Under RFC 7489, pct=25 asked receivers to apply the policy to 25 percent of failing mail and the next lower policy to the rest. Two caveats:
- RFC 9989 removed
pct. It notes that values other than 0 and 100 were applied inconsistently across receivers. - The replacement is
t=y(test mode), which asks receivers to apply the policy one level lower:quarantineis treated asnone,rejectasquarantine. Reporting is unaffected.
Receivers adopt the new specification at their own pace, and both specifications require unknown tags to be ignored. If you want a staged step, a reasonable approach is a short period at p=quarantine with t=y, then removing t. Do not depend on fine-grained percentages. The policy comparison guide covers the trade-offs.
Step 6: Move to p=reject
When quarantine has run cleanly, finish the rollout:
_dmarc.example.com. IN TXT "v=DMARC1; p=reject; sp=reject; rua=mailto:dmarc@example.com"
Failing mail is now refused during the SMTP transaction by receivers that honor the policy. sp=reject makes the subdomain policy explicit. If you publish separate DMARC records on specific subdomains, those take precedence for mail from those subdomains.
Keep rua. New senders appear over time (a team signs up for a new tool), and reports are how you notice before they start bouncing.
Worked example: a 10-week rollout
| Week | Record | What happens |
|---|---|---|
| 0 | p=none; rua=... |
Reports start arriving within a day or two |
| 1 to 4 | unchanged | Reports show three unaligned senders: CRM, help desk, billing |
| 3 to 5 | unchanged | DKIM set up on CRM and help desk; billing moved to billing.example.com |
| 6 | p=quarantine; t=y; rua=... |
Policy published, test mode on |
| 7 | p=quarantine; rua=... |
Full quarantine; one forgotten survey tool shows up and is fixed |
| 9 | p=reject; sp=reject; rua=... |
Enforcement complete |
| Ongoing | unchanged | Weekly report review |
A small domain with one mailbox provider can move faster. A large organization with dozens of senders often needs several months.
How long does DMARC take to work?
The record works as soon as DNS propagates, usually within the TTL you set. Aggregate reports typically start within 24 to 48 hours, since most receivers send them once per day. The full rollout depends on how many senders you need to fix.
Do subdomains need their own DMARC record?
Not necessarily. A receiver looking up news.example.com that finds no record there falls back to the organizational domain's record and applies sp (or p if sp is absent). Publish a separate record on a subdomain only when it needs a different policy or different report addresses.
Common mistakes
- Two DMARC records. Receivers discard both. Edit the existing record instead of adding one.
- Quotes or the hostname inside the value. Some DNS panels add quotes automatically. The value should start with
v=DMARC1. - Missing semicolons. Tags are separated by
;. - Missing authorization for an external
rua. Reports silently go nowhere. - Enforcing before monthly senders appear. Wait long enough to see a full business cycle.
- SPF over 10 lookups. SPF then fails with a permanent error and can no longer give you an aligned pass.
- Vendor DKIM with the vendor's domain.
d=vendor.examplepasses DKIM but does not align with your From domain. - Forgetting non-sending domains. Publish
v=DMARC1; p=reject;andv=spf1 -allon parked domains.
Checklist
- SPF record published, under 10 lookups, ending in
~allor-all - DKIM signing on every sending service, with
d=your domain - One DMARC record at
_dmarcwithp=noneandrua - External report destinations authorized
- Two to four weeks of reports reviewed
- Every legitimate source passing with alignment
-
p=quarantine, thenp=reject, withspset deliberately - Reports still monitored after enforcement
Generate your record with the DMARC record generator, then verify it with our free DMARC checker.