Setting Up DMARC For Gmail:
A Step-By-Step Guide
A Step-By-Step Guide
Email phishing and domain spoofing remain significant risks to digital communication. When your domain is exploited for malicious purposes, it can damage your reputation and lead to blacklisting or data breach. A highly effective strategy to combat these threats is the implementation of DMARC (Domain-based Message Authentication, Reporting & Conformance). This detailed guide provides a step-by-step approach to configuring DMARC for Gmail, enabling you to protect your domain and enhance trust in your communications.
What Is DMARC and Why Does Gmail Need It?
DMARC is an email authentication standard that operates alongside SPF and DKIM. It enables domain owners to set policies in their DNS records, guiding receiving mail servers on managing unauthenticated emails. Widely utilized by both businesses and individuals, Gmail supports DMARC to promote secure and reliable email delivery.
By using DMARC, Gmail users and domain admins can:
- Prevent email spoofing
- Identify unauthorized email senders
- Instruct receiving servers on how to handle failed emails
- Gain visibility into email flows via DMARC reports

Step 1: Ensure SPF and DKIM Are Properly Configured
Prior to configuring DMARC, it is essential that your domain has properly established SPF and DKIM records. For DMARC to operate effectively, Gmail mandates the presence of these two protocols.
SPF Setup for Gmail
Add the following SPF TXT record to your domain’s DNS settings:
v=spf1 include:_spf.google.com ~all
This record permits Google’s mail servers to send emails for your domain. Be sure to verify if other services, such as Mailchimp or SendGrid, also send emails on behalf of your domain and include them accordingly.
DKIM Setup for Gmail
To set up DKIM for Gmail:
- Sign in to your Google Admin console at admin.google.com.
- Navigate to: Apps → Google Workspace → Gmail → Authenticate Email.
- Select your domain and click Generate new record.
- Copy the DKIM TXT record (selector and key) provided by Google.
- Add this DKIM record to your DNS host.
- Return to the Admin console and click Start Authentication.
It may take up to 48 hours for DNS changes to propagate.
Step 2: Create and Publish a DMARC Record
Once SPF and DKIM are verified, proceed to create and publish your DMARC record.
Basic DMARC Record Syntax
v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com
Here’s what each tag means:
v=DMARC1 – Specifies DMARC version.
p=none – Policy for failed messages (none, quarantine, or reject).
rua – Email address to receive aggregate reports (daily summaries).
How to Add the Record
- Log in to your DNS hosting provider (e.g., GoDaddy, Cloudflare, Namecheap).
- Add a new TXT record with:
- Host/Name: _dmarc
- Type: TXT
- Value: v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com
Note: Ensure the email for rua is valid and accessible. It may be beneficial to create a dedicated inbox for managing DMARC reports.
Step 3: Monitor Reports and Analyze Data
Once your DMARC record is active, you will start receiving daily XML reports from ISPs like Google. These reports provide valuable information:
- Which IPs are sending email on behalf of your domain.
- Whether emails passed SPF and DKIM checks.
- Where authentication is failing.
Tools for Parsing DMARC Reports
Raw XML reports can be difficult to interpret. Use DMARC report analyzer tools like:
- DMARCian
- Postmark
- Agari
- MxToolbox
These tools convert XML into readable dashboards, charts, and summaries. To learn more, all you need to do is click the link.
Step 4: Tighten Your Policy
Start with p=none to monitor email flow without affecting delivery. After reviewing reports and confirming all legitimate sources are passing SPF and DKIM, you can transition to stricter policies.
Policy Options:
- p=none – Monitoring only, no enforcement.
- p=quarantine – Emails that fail DMARC go to spam/junk.
- p=reject – Failing emails are blocked and not delivered.
Example Policy for Rejecting Unauthenticated Emails
v=DMARC1; p=reject; rua=mailto:dmarc-reports@yourdomain.com;
ruf=mailto:dmarc-forensics@yourdomain.com; pct=100
- ruf: Forensic reports (contain detailed info about specific failures).
- pct=100: Apply policy to 100% of messages.
Gradually escalate enforcement using pct values like 25, 50, 75 before reaching 100.

Step 5: Maintain and Optimize Continuously
Implementing DMARC is not a “set it and forget it” solution. You must continuously monitor, especially if you integrate new mail systems, CRMs, or third-party platforms.
Best Practices for Maintenance
- Regularly check reports for unexpected sources.
- Update SPF/DKIM records when new services are added.
- Rotate DKIM keys periodically for better security.
- Audit DMARC policy quarterly or bi-annually.