Advertisement
Skip to content

How to set up DMARC for a domain: exact DNS TXT record and verification steps

By Published 9 min read

On this page (10 sections)
  1. The short version
  2. What you need before you start
  3. How DMARC fits with SPF and DKIM
  4. How to set up DMARC for a domain with a DNS TXT record
  5. Where and how to add the DMARC record in DNS
  6. How to verify the DMARC record is active and correct
  7. What DMARC reports show and how to use them
  8. When to move from monitoring to enforcement
  9. Common mistakes to avoid
  10. Questions people still ask

In short: You set up DMARC by publishing one TXT record at _dmarc.yourdomain.com. Start with v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com, then review aggregate reports before enforcement.

Part of our guide on email authentication fails after changing dns records

At a glance
Record name_dmarc.yourdomain.com
Record typeTXT
Starting policyp=none
Report typeAggregate XML reports
DNS checkdig TXT _dmarc.example.com +short
Reports inboxOne working mailbox

The short version

  • Add the record at _dmarc.yourdomain.com, not at the bare domain
  • Start with p=none so you can identify legitimate senders
  • Use a mailbox that exists and can receive report attachments
  • Check the record with dig or nslookup
  • Move to p=quarantine or p=reject only after known senders pass SPF and DKIM

What you need before you start

DMARC needs access to your domain's DNS zone, so find the registrar or host controlling those records. A website dashboard alone won't always provide DNS access.

Use the generic path in your provider's panel: open the domain, choose its DNS zone or DNS records editor, and add a TXT record. At the time of writing, Hostinger labels this area Domains, then DNS zone in hPanel. Check its current help page or your panel if the labels differ.

You also need a mailbox for aggregate reports, such as dmarc@yourdomain.com. Create it before publishing the record, or send reports to an address you already monitor.

List every service sending mail with your domain. Include your mailbox provider, website forms, newsletter platform, CRM, invoices, and password-reset system. We go through validate signup email legitimacy step by step elsewhere on the site.

  • DNS access for the exact sending domain
  • A working mailbox for rua reports
  • A list of services that send mail
  • Access to SPF and DKIM settings for those services
  • A DNS command or lookup tool for checking the result

How DMARC fits with SPF and DKIM

Laptop open on a desk beside a domain registrar dashboard
Laptop open on a desk beside a domain registrar dashboard

SPF lists approved sending servers, while DKIM adds a signature to outgoing messages. DMARC checks whether either result aligns with the visible From domain.

Imagine a shop sending receipts through one provider and newsletters through another. Both providers need correct authentication, or DMARC reports will show failures.

An aggregate report is usually a gzipped XML attachment. Each reporting receiver sends its own report, often covering the messages it saw during one reporting period.

The XML lists source IP addresses, message counts, SPF and DKIM results, alignment, and the policy applied. Use it to identify an unapproved service or a broken configuration.

What each email record does
RecordPurposeWhat breaks without it
SPFLists approved sending serversReceivers can't confirm the sending host is allowed
DKIMSigns outgoing messagesReceivers can't verify the message signature
DMARCSets handling and reporting rulesYou lose visibility and policy control over spoofed mail

How to set up DMARC for a domain with a DNS TXT record

Start with a monitoring policy. It asks receivers to send aggregate reports while applying no enforcement to failing mail.

Create one TXT record with this value: v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com. Replace the example domain and mailbox with your own details.

The v tag identifies DMARC. The p tag sets the policy, and rua lists the address for aggregate reports. Multiple rua addresses can be comma-separated.

A single TXT character string is limited to 255 characters. DNS can store a record with a total of 2048 characters, so a longer DMARC value can use multiple quoted TXT strings in DNS software that supports joining them. Keep this starter value as one string.

  • v=DMARC1 – the DMARC version
  • p=none – monitor without enforcement
  • rua=mailto:dmarc@yourdomain.com – aggregate report address
  • sp=none – optional policy for subdomains
  • pct=25 – optional percentage of messages affected by policy

Where and how to add the DMARC record in DNS

Three DNS record rows listed in a hosting control panel
Three DNS record rows listed in a hosting control panel

Open your registrar or host panel and enter the DNS zone editor for the domain. The field names usually include Type, Name or Host, Value, and TTL.

At the time of writing, Hostinger's hPanel path is Domains, then DNS zone beside the domain. Confirm the current labels in Hostinger's help documentation or use a current panel screenshot before following the clicks.

Enter _dmarc when the panel appends your domain automatically. Enter _dmarc.yourdomain.com when the panel expects a full hostname.

Choose TXT as the type, paste the value, and leave TTL at the provider's default unless you have a reason to change it. Save the record.

  1. Open the DNS zone editor for your domain.
  2. Choose Add record or its equivalent.
  3. Set Type to TXT.
  4. Enter _dmarc or the full _dmarc.yourdomain.com, based on the field instructions.
  5. Paste v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com.
  6. Save the record and note the TTL shown by the panel.

How to verify the DMARC record is active and correct

Check the public DNS answer instead of relying only on the saved panel. On macOS or Linux, run dig TXT _dmarc.example.com +short. Replace example.com with your domain.

On Windows, run nslookup -type=txt _dmarc.example.com. The answer should contain v=DMARC1, p=none, and your rua address.

The record becomes visible after caches holding the previous TTL expire. A default TTL of 3600 means a resolver can keep the old answer for up to one hour; your provider and resolver determine the observed timing.

Check the returned value for spelling, the underscore in _dmarc, the report address, and duplicate records. Then test SPF and DKIM for every sending service.

  1. Run dig TXT _dmarc.example.com +short or the Windows nslookup command.
  2. Confirm the answer contains one valid DMARC policy.
  3. Check SPF and DKIM alignment for each sending service.
  4. Send test messages through each known sender.
  5. Watch the report mailbox and inspect the XML attachments.

What DMARC reports show and how to use them

Text cursor in a single TXT record value field
Text cursor in a single TXT record value field

Receivers that support aggregate reporting typically send one report per day for the messages they observed. A new domain can receive nothing for several days until mail actually flows through a reporting receiver.

Open the gzipped XML attachment with a DMARC report viewer or an XML reader. Group rows by source IP, sending service, result, and alignment rather than reading every message separately.

Known providers should pass SPF or DKIM with alignment to your From domain. Investigate unfamiliar IP addresses, failed DKIM signatures, and services missing from your SPF record.

Keep a short list of confirmed senders and record the fix for each failure. Repeat the check after changing a provider, adding a marketing tool, or moving your mailbox.

  • Source IP and reporting receiver
  • Message count for each source
  • SPF and DKIM authentication results
  • Header and envelope domain alignment
  • The policy applied to failing messages

When to move from monitoring to enforcement

Keep p=none until reports show only known senders and both SPF and DKIM pass with alignment. That condition matters more than a fixed number of days.

Change the policy to p=quarantine when your sending list is understood. Receivers then handle failing mail as suspicious, often placing it in spam.

Use pct=25 or another percentage when your receiver supports gradual rollout. The tag limits the share of failing messages covered by the policy.

Move to p=reject after the reports remain clean through normal sending patterns. Set sp= separately if subdomains need a different policy.

A domain that sends no mail should still publish p=reject with an empty rua, such as v=DMARC1; p=reject; rua=. Skipping DMARC leaves the domain without a published anti-spoofing policy.

DMARC policy levels and controls
PolicyWhat receivers do with failing mailWhen to use it
p=noneMonitor and report without enforcementWhile you identify and fix senders
p=quarantineTreat failing mail as suspiciousAfter known senders pass
p=rejectReject failing mailAfter normal sending remains aligned
pct=25Apply the policy to part of the trafficDuring a controlled rollout
sp=rejectSet a separate policy for subdomainsWhen subdomains need stricter handling

Common mistakes to avoid

Most DMARC failures come from a wrong hostname, an unusable report address, or a sender missing from SPF or DKIM. Check those details before changing policy.

Mailing lists and forwarding services can rewrite the sender or alter message handling. Strict aspf=s alignment can then fail even when the mail is legitimate, so leave strict alignment out until you have tested those paths.

  • Wrong record name – use _dmarc, not dmarc
  • Duplicate DMARC records – keep one policy record
  • Unusable rua mailbox – confirm it accepts report attachments
  • Missing sending service – configure its SPF and DKIM records
  • Strict alignment too early – test mailing lists and forwarding paths first
  • Policy changed before reports are understood – keep enforcement controlled
  • Long TXT value entered as separate records – use the DNS provider's supported string format
The verdict

Publish p=none, verify the DNS answer, and use aggregate reports to confirm every sender passes before enforcement.

Questions people still ask

How long does a DMARC record take to become active?

DNS resolvers use the record after their cached copy expires. A 3600-second TTL can mean up to one hour for one resolver. Aggregate reports often arrive later because receivers commonly send them daily.

Do I need DMARC if my domain sends no email?

Yes. Use p=reject for a domain with no legitimate mail stream. You can omit rua or leave it empty, depending on your receiver or validator’s behaviour.

What do ruf and fo do?

ruf=mailto:address requests forensic reports about individual failures. Reporting is optional, inconsistently implemented, and commonly redacted or unsent. Don’t rely on it for monitoring. The fo tag controls which failures trigger those requests.

Can I send aggregate reports to more than one address?

Yes. Separate mailto: addresses with commas in rua. Some receivers require external-destination authorisation. That process usually requires a DNS record at the reporting domain, so check its instructions.

What happens if p=reject blocks legitimate mail?

Change the policy to p=none while you investigate the sender, SPF, DKIM, and alignment. Move to p=quarantine only after known senders pass, then use p=reject. Don’t build a rollout around pct; the current specification deprecates it, and receivers honour it inconsistently.

I set up DMARC records for domains hosted on shared plans and use report rows to trace missing DKIM entries and unknown senders.