XiaTools

A Complete Beginner's Walkthrough to Domain Authentication and DMARC

By Rohit, founder of XiaTools · Updated 18 Oct 2026

Domain authentication DMARC is an email security standard that protects your domain from being impersonated by spammers and phishers. By combining Sender Policy Framework (SPF) and DomainKeys Identified Mail (DKIM), DMARC tells receiving mail servers exactly what to do when an incoming email fails authentication checks.

If you want to create your policy without hassle, you can use the DMARC Record Generator on XiaTools to build a valid DNS record in seconds.

Understanding the Email Authentication Trio

To understand domain authentication, you need to look at how email works at the protocol level. SMTP, the underlying protocol for sending email, has no built-in mechanism to verify the sender's identity. Anyone can write any address in the "From" header. To fix this trust deficit, the industry relies on three complementary protocols working together.

SPF (Sender Policy Framework)

SPF is a TXT record published in your DNS that lists all the authorized IP addresses and servers allowed to send email on behalf of your domain. When a mail server receives an email from user@example.com, it queries the DNS for example.com's SPF record. If the sending IP matches one listed in the record, the check passes. If it does not, the check fails.

DKIM (DomainKeys Identified Mail)

DKIM adds a cryptographic digital signature to the header of every outgoing email. The sending mail server signs the email with a private key, and the public key is published in your DNS settings. When the receiving server gets the message, it fetches the public key and verifies the signature, ensuring the email content was not altered in transit and genuinely originated from your domain.

DMARC (Domain-based Message Authentication, Reporting, and Conformance)

DMARC ties SPF and DKIM together. It introduces the concept of "alignment," checking whether the domain in the visible "From" header matches the domains authenticated by SPF and DKIM. Furthermore, DMARC allows you to specify a policy telling receiving servers what to do with unauthenticated emails (none, quarantine, or reject) and provides daily XML reports detailing who is sending email using your domain.

How DMARC Works in Practice

When an email arrives at a destination inbox like Gmail or Microsoft 365, the receiving server evaluates the message through the following sequence:

  1. SPF Check: The server inspects the return-path domain and validates the sending IP against the published SPF record.
  2. DKIM Check: The server validates the cryptographic signature against the public DKIM record found in DNS.
  3. Alignment Check: The server verifies that the domain in the header matches the domain authenticated by SPF and/or DKIM.
  4. Policy Enforcement: The server looks up your DMARC TXT record (_dmarc.example.com) to see what action to take if the alignment or authentication fails.
DMARC Policy Action on Failure Recommended Use Case
p=none Deliver normally, send reports Initial monitoring phase to discover legitimate mail flows
p=quarantine Send to spam/junk folder Intermediate phase after verifying all legitimate sources
p=reject Block outright at SMTP level Final enforcement phase for maximum brand protection

Step-by-Step Guide to Implementing DMARC

Implementing DMARC successfully requires a methodical approach to avoid accidentally blocking your own legitimate marketing or transactional emails.

Step 1: Set Up and Verify SPF

Before touching DMARC, ensure your SPF record is published correctly and does not exceed the 10 DNS lookup limit. A standard SPF record looks like this:

v=spf1 ip4:192.0.2.1 include:_spf.google.com ~all

You can verify your SPF record using command-line tools like dig or nslookup on your workstation:

dig TXT example.com

Step 2: Set Up and Verify DKIM

Log into your email provider or transactional email service and enable DKIM signing. They will provide you with a CNAME or TXT record to publish in your DNS zone (often structured like selector._domainkey.example.com).

Step 3: Publish a Monitoring DMARC Record

Always start with a monitoring policy (p=none) and configure reporting email addresses to collect data. A safe initial record looks like this:

v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com; pct=100

Add this record to your DNS management console as a TXT record with the host name _dmarc.example.com (note the leading underscore).

Step 4: Analyze Reports and Transition to Enforcement

Monitor the XML reports sent to your reporting mailbox for at least two to four weeks. Once you confirm that all legitimate sending sources pass authentication, update your DMARC record to quarantine:

v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@example.com

After another week of clean logs, graduate to the strict reject policy:

v=DMARC1; p=reject; rua=mailto:dmarc-reports@example.com

Common Mistakes and How to Fix Them

Even experienced engineers occasionally run into configuration pitfalls. Here are the most common mistakes and how to resolve them:

  • Multiple SPF Records: A domain can only have one active SPF record. If you publish two, mail servers will return a permanent error (temperror or permerror). Combine all your services (include:, ip4:) into a single SPF record.
  • Incorrect Hostname: Setting the DMARC record on example.com instead of _dmarc.example.com. Always ensure the DNS record host includes the _dmarc prefix.
  • Moving to Reject Too Fast: Jumping straight to p=reject without monitoring p=none reports will often block your own newsletters, CRM notifications, or password reset emails.
  • SPF Lookup Limit Exceeded: SPF permits a maximum of 10 DNS lookup queries. If you exceed this by nesting too many include statements, authentication fails. Flatten your SPF record or use dedicated IP addresses where possible.

DMARC Implementation Checklist

  • Inventory all services that send email on behalf of your domain (marketing, CRM, billing, support).
  • Publish a valid SPF record containing all authorized sending IPs and includes.
  • Enable DKIM signing for all email streams and publish the corresponding public keys.
  • Deploy an initial DMARC record with p=none and a reporting address (rua).
  • Review XML reports for 2 to 4 weeks to spot unauthenticated legitimate traffic.
  • Upgrade the DMARC policy from p=none to p=quarantine, then finally to p=reject.

Frequently asked questions

Why is DMARC important for my domain?

DMARC prevents malicious actors from spoofing your domain to send phishing emails and spam to your customers or partners. Without DMARC, receiving mail servers cannot verify if an email claiming to be from your company is legitimate, which damages your brand reputation and deliverability.

What happens if I set my DMARC policy to p=reject immediately?

Setting your policy straight to reject without prior monitoring will likely block legitimate emails sent from third-party tools, CRM systems, or newsletters that you forgot to authenticate. Always start with p=none to review your mail flow via reports before enforcing strict policies.

How long should I stay on the p=none monitoring policy?

It is recommended to keep your DMARC policy at p=none for at least two to four weeks. This window ensures you capture periodic automated emails, monthly newsletters, and transactional messages across different business cycles.

Can I use the same email address for SPF and DMARC reports?

Yes, you can use your standard administrative email address, but it is best practice to create a dedicated mailbox like dmarc-reports@example.com. Because DMARC XML reports generate a high volume of automated messages, separating them prevents your primary inbox from getting cluttered.

What is the difference between SPF, DKIM, and DMARC alignment?

SPF alignment checks if the return-path domain matches the header From domain, while DKIM alignment checks if the signing domain in the cryptographic signature matches the header From domain. DMARC enforces that at least one of these two mechanisms successfully aligns with the From header.

Related articles

Free tools