To set up DMARC, make sure SPF or DKIM already authenticates your mail, then add one TXT record at _dmarc.yourdomain.com with a value like v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com. Save it, confirm it with a DNS lookup, read the reports for a few weeks, and only then tighten the policy to quarantine and reject. The whole publishing step takes about five minutes. The part that takes time is learning who sends mail as your domain.
This guide walks through each step, including the cPanel path, the SPF "too many DNS lookups" error that trips up many domains, and how alignment decides whether a message passes.
TL;DR
- Publish a single TXT record at the
_dmarchost of your domain. Onlyv=DMARC1(first) andp=are required, andrua=is strongly recommended. - Start with
p=none, collect reports, then move top=quarantineand finallyp=rejectonce legitimate senders all pass. - SPF and DKIM must be working first. DMARC passes when either one passes and aligns with your visible From domain.
- SPF allows at most 10 DNS lookups. Go over and SPF fails with a permanent error, so inventory your senders and trim includes.
- Verify with
dig +short TXT _dmarc.yourdomain.com, but remember a correct lookup does not prove every sender passes.
Table of Contents
- What DMARC does and what must be in place first
- How DMARC alignment works
- Build your DMARC record
- Add the record in DNS
- Check that the record is live
- Read your reports before tightening policy
- Do you have to publish DMARC at all?
- Fix "too many DNS lookups" in SPF
- Our perspective
- Host your site and DNS where setup stays simple
- FAQ
- Sources
What DMARC does and what must be in place first
Three records work together. SPF lists the servers allowed to send for your domain. DKIM adds a cryptographic signature to each message that receivers check against a public key published in your DNS. DMARC sits on top: it tells receivers what to do when a message fails those checks and asks them to send you reports. Cloudflare's explainer describes the three in the same division of labor.
The order matters. Google's DMARC setup guidance says SPF and/or DKIM must be enabled before DMARC, and it recommends letting them authenticate your mail for at least 48 hours before you turn DMARC on. If you publish DMARC first, you will simply get reports full of failures you cannot interpret.
Before you touch DNS, write down every service that sends email as your domain:
- Your main mailbox provider
- Your website and WordPress forms or order emails
- A newsletter or marketing platform
- Your invoicing, CRM and helpdesk tools
- Any server scripts that send alerts
This list becomes your reference when the first reports arrive. If your site sends mail through WordPress, our guide to WordPress SMTP setup for small sites covers getting that stream authenticated properly.
How DMARC alignment works
Alignment is where most confusion lives. A message can pass SPF on its own and still fail DMARC, because DMARC asks a stricter question: does the domain that passed match the domain the reader sees in the From line?
Per Google's guidance, DMARC passes when at least one of SPF-plus-alignment or DKIM-plus-alignment passes. Failure requires both paths to fail. That is why one broken mechanism does not automatically sink your mail, and why having both in place is the safest setup.
Two optional tags control how strict the match is:
aspf=sets alignment for SPF (the Return-Path domain versus the From domain).adkim=sets alignment for DKIM (the signingd=domain versus the From domain).
The default for both is relaxed (r): the organizational domain only has to match, so mail.example.com aligns with example.com. Strict (s) demands an exact match. Mailflow Authority's tag reference recommends relaxed alignment because strict mode frequently breaks legitimate forwarding and shared infrastructure. Leave both tags out and you get relaxed, which suits nearly every small business.
A practical example: your newsletter tool sends from its own bounce domain, so SPF passes for the tool's domain, not yours. SPF does not align. If that tool also signs with a DKIM key for your domain, DKIM aligns and DMARC passes anyway. That is why most platforms ask you to add DKIM records during domain verification.
Build your DMARC record
A DMARC record is a single line of tags separated by semicolons. cPanel's official documentation states that only two tags are required: v=DMARC1 (the version, which must come first) and p= (the policy). Everything else is optional.
| Tag | What it does | Typical starting value |
|---|---|---|
v | Protocol version, must be first | DMARC1 |
p | Policy for failing mail | none |
rua | Where aggregate (daily summary) reports go | mailto:dmarc@yourdomain.com |
ruf | Where per-message failure reports go | Usually omitted |
pct | Percentage of failing mail the policy applies to | 100 (default) |
sp | Policy for subdomains | Inherits p if omitted |
aspf / adkim | Alignment mode | r (default) |
The three policy values mean:
- none: monitor only. Nothing changes about delivery.
- quarantine: receivers treat failing mail as suspicious, typically sending it to spam.
- reject: receivers refuse failing mail outright.
The rua= tag, as explained in DmarcSignal's guide, sets where aggregate reports go, while ruf= sets where forensic reports go. The fo= tag decides when forensic reports are generated: fo=0 (default) only when both SPF and DKIM fail, fo=1 when either fails. Many receivers send few or no forensic reports, so rua is the tag that matters.
A sound first record:
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com; pct=100
This matches Google's recommendation to begin with p=none, include rua for reports, and keep v and p first. Use a mailbox you actually read, or better, a dedicated address that is not your main inbox. Reports are XML files and they can pile up fast.
One caution: if the report address sits on a different domain than the one being protected, the receiving domain may need to authorize it. Using an address on the same domain avoids the issue.
Add the record in DNS
Wherever your DNS is hosted, the fields are the same. If you are unsure where your DNS lives, check which nameservers your domain uses first; our explainer on DNS management for website owners covers how to tell. The record must go on your domain's authoritative nameservers, or receivers will never see it.
- Log in to the DNS panel for your domain.
- Add a new record of type TXT.
- Set the host/name to
_dmarc. Some panels want the full_dmarc.yourdomain.com, and some append the domain for you. If yours appends it, typing the full name creates_dmarc.yourdomain.com.yourdomain.com, which does nothing. - Paste the value (the
v=DMARC1; ...string) with no extra quotes unless the panel asks for them. - Leave the TTL at the default or choose a value between 1800 and 3600 seconds, the range cPanel's documentation gives.
- Save.
Per cPanel's documentation, the class must be IN and the type TXT, and the hostname must begin with _dmarc even when the record is for a subdomain (for example _dmarc.sub.yourdomain.com).
Two behaviors to know about. First, DMARC records are "all-for-one": one record on your main domain covers every subdomain unless a subdomain has its own record. Second, publish exactly one DMARC record per name. Two records make the policy undefined, according to DMARC Engine's checking guide.
If you register your domain with us, DNS records are editable from the same account. See domain registration with DNS management for details.
DMARC setup in cPanel
If your hosting uses cPanel, the route is the Zone Editor:
- Open Zone Editor and click Manage beside your domain.
- Choose Add Record, then TXT.
- In Name, enter
_dmarc.yourdomain.com.with the trailing dot, or just_dmarcif your version fills in the domain automatically. DMARC Record Checker notes the full name with trailing dot is usually required, but some versions auto-append. - Paste your DMARC string in the record value field.
- Save the record.
One thing catches people out. In cPanel 82 and later, the Email Deliverability section can auto-install recommended SPF and DKIM records, but it does not create DMARC. You still add the DMARC TXT record yourself through the Zone Editor.
Check that the record is live
DNS changes usually show up within minutes and occasionally take up to a day, according to Bird's setup guide. To look it up from a terminal:
dig +short TXT _dmarc.yourdomain.com
On Windows, use nslookup -type=TXT _dmarc.yourdomain.com.
A healthy result has exactly one record, starts with v=DMARC1, contains a valid p= value, and normally includes rua=. If you see nothing, the usual causes are a doubled domain in the host name, a missing underscore, or editing DNS at a host that is not your authoritative nameserver.
Keep the limits of this check in mind. Palisade's validation guidance points out that a DNS lookup proves what is published, not that every real sender passes DMARC. For that you need message headers (send a test email to a mailbox and view the original) and the aggregate reports.

Read your reports before tightening policy
Within a day or two, receivers start sending XML aggregate reports. Raw XML is unpleasant, so most site owners feed it into a report viewer, but the fields worth reading are few:
- Source IP and count: which servers sent how many messages as your domain.
- SPF and DKIM results: evaluated results and whether they aligned.
- Disposition: what the receiver did with the message.
Do not confuse disposition with health. As ColdOps explains in its report guide, disposition shows what the receiver did, not whether authentication succeeded. Under p=none, a failing message can still show disposition none, so read the SPF and DKIM results separately.
For each source you see, decide: is it legitimate? If yes, fix its authentication (add its include to SPF, or enable DKIM signing for your domain). If you do not recognize it, it may be abuse or a forgotten tool, which is precisely what DMARC is built to reveal.
Moving to enforcement
Google and Bird both describe the same path: start at p=none, learn how messages are authenticated, then move to quarantine and finally reject once reports look clean. A cautious schedule looks like this:
p=nonefor several weeks, covering at least one full business cycle (month-end invoices, quarterly newsletters).p=quarantine; pct=10, then raisepctstepwise to 100 as no legitimate mail lands in spam.p=rejectonce the reports show only mail you do not recognize failing.
The pct tag lets you apply a policy to a fraction of failing mail while you gain confidence.
Do you have to publish DMARC at all?
If you send bulk email, yes. For Gmail senders pushing 5,000 or more messages a day, DMARC is required and p=none is acceptable, and the visible From domain must align with SPF or DKIM. Smaller senders are not bound by that threshold, but the same record protects your domain from being spoofed and gives you visibility into who is mailing in your name. For a plain-language look at how deliverability works for a membership-style sender, this email deliverability guide for clubs walks through the practical side.
Fix "too many DNS lookups" in SPF
DMARC reports often expose a second problem: an SPF record that is broken without anyone noticing. SPF allows at most 10 DNS lookups per evaluation, and Cloudflare's DMARC documentation states that exceeding it causes a permanent error. When SPF returns a permanent error, it cannot contribute to a DMARC pass, leaving DKIM alone to carry the message.
What counts toward the limit
The mechanisms that consume lookups are include, a, mx, ptr and redirect. The mechanisms ip4, ip6 and all need no lookup, as DMARC Engine's SPF guide lists.
The trap is nesting. An include costs one lookup for itself plus every lookup inside the record it points to. A record with just five visible includes can therefore cross ten once each provider's own includes are counted. Add a newsletter tool, a CRM, a helpdesk and a mailbox provider, and you are close to the ceiling.
A cleanup sequence that does not break mail
- Inventory real senders. Use your DMARC reports, not memory, to see which services actually send as your domain.
- Remove dead includes. Tools you stopped using years ago are the most common cause.
- Merge duplicates. A domain must have one SPF record. Two make SPF fail.
- Swap fixed
aandmxforip4/ip6where the addresses are stable and yours. - Delete
ptr. It is lookup-hungry and discouraged. - Recount. Use an SPF checker that counts nested lookups, then watch reports after each change.
If you are still over ten, SPF flattening replaces includes with the IP ranges they resolve to. It cuts lookups but has a catch: DMARC Engine's PermError article warns that providers change their IPs, so a static flattened record goes stale. Automate it or review it regularly.
Another option is to split mail streams across subdomains. Marketing mail can go out from news.yourdomain.com with its own SPF record and its own lookup budget. The envelope and From domains still need to be arranged so DMARC aligns.
While you review sender trust, it also helps to understand why spoofing works in the first place. This short explanation of IP spoofing shows why SPF alone is not a complete defense. Our own walkthrough, protecting deliverability with SPF and DKIM, goes deeper on staying under the lookup limit.
Our perspective
Most DMARC problems we see are not DMARC problems. They are inventory problems: nobody knows every system that sends mail as the domain, so the policy gets stuck at
p=noneforever or is pushed torejecttoo early and legitimate invoices vanish.Our approach is to treat the first month as discovery. Publish the monitoring record, read the reports, fix SPF and DKIM for each real sender, and only then enforce. A site owner who does this once rarely has to touch it again.
This is also why we put engineers, not scripts, behind customer sites. Our sites are managed by experienced SRE and DevOps engineers in the EU and US, and free migration means your DNS and mail records can move with you without a gap in authentication. Daily backups and a 30-day money-back guarantee mean you can set things up carefully, not in a rush.
Ihor
Host your site and DNS where setup stays simple
Getting email authentication right is easier when your domain, DNS and hosting live in one dashboard. At inSave Hosting you can register or transfer a domain, manage its records, and run your site on shared hosting or WordPress hosting, with free SSL, daily backups and free migration included. If you are moving an existing site, we handle the migration so your records and mail setup keep working.

Larger projects with several mail-sending apps can run on our VPS plans, where you control the server and its outbound mail configuration. Browse the domain names page to get started.
FAQ
Should I start with p=none, quarantine or reject?
Start with p=none. It changes nothing about delivery while you collect reports and find out which systems send as your domain. Google's guidance recommends this approach, followed by a move to quarantine or reject over time. Enforce only when reports show your legitimate senders passing.
Do I need both SPF and DKIM for DMARC?
DMARC needs only one of them to pass with alignment. In practice you should set up both, because forwarding often breaks SPF and a DKIM signature usually survives. Having both gives each message two chances to pass.
Can I have more than one DMARC record?
No. Publish exactly one TXT record at _dmarc.yourdomain.com. Two records make the policy undefined and receivers may ignore both. To change your policy, edit the existing record rather than adding another.
Why did my DMARC lookup work but my email still fails?
A lookup only proves the record is published. It does not show that each sender authenticates and aligns. Check message headers for SPF and DKIM results and read your aggregate reports for the sources that fail.
Does cPanel create the DMARC record for me?
Not in recent versions. The Email Deliverability section can install SPF and DKIM records, but you add the DMARC TXT record manually in the Zone Editor under the _dmarc name.
Sources
- Set up DMARC, Google Workspace Admin guidance
- What are DMARC, DKIM, and SPF?
- Every DMARC Tag Explained, Mailflow Authority
- How to build a DMARC record, cPanel
- Complete DMARC Guide, DmarcSignal
- DMARC Record in cPanel, DMARC Record Checker
- How do I check that my DMARC is working? DMARC Engine
- How to set up DMARC, Bird
- DMARC checker: DNS and message checks, Palisade
- How to Read a DMARC Report, ColdOps
- Gmail and Yahoo sender guideline updates in 2024, Blueshift
- DNS lookup limit, Cloudflare DMARC Management docs
- How do I fix a failing SPF record? DMARC Engine
- How to fix SPF PermError, DMARC Engine
- Email deliverability for golf clubs, BallChute
- IP Spoofing
