XiaTools

SendGrid Sender Authentication: Adding Your DMARC TXT Record

By Rohit, founder of XiaTools · Updated 15 Oct 2026

Completing your sendgrid dmarc configuration is essential for protecting your domain's reputation, preventing email spoofing, and ensuring your marketing campaigns reach the inbox rather than the spam folder. DMARC (Domain-based Message Authentication, Reporting, and Conformance) builds directly upon SPF and DKIM to give domain owners control over how receiving mail servers handle unauthenticated messages. Without a proper DMARC policy, threat actors can easily impersonate your brand, degrading your sender score and damaging customer trust.

To build your policy quickly and accurately without syntax errors, you can use the DMARC Record Generator to instantly create a customized TXT record tailored to your exact reporting and enforcement requirements.

Understanding the Core Pillars: SPF, DKIM, and DMARC

Before publishing your DMARC record, you must ensure that Sender Policy Framework (SPF) and DomainKeys Identified Mail (DKIM) are fully authenticated inside your SendGrid account. DMARC does not authenticate mail by itself; instead, it relies on alignment checks against your SPF and DKIM records.

  • SPF: Declares which mail servers are authorized to send email on behalf of your domain. SendGrid requires you to add specific CNAME records to publish their SPF include mechanism.
  • DKIM: Adds a cryptographic digital signature to your outgoing messages. SendGrid achieves this through CNAME-based domain authentication, which points to their key rotation infrastructure.
  • DMARC: Tells receiving mail servers what to do if an email fails SPF or DKIM alignment, and where to send daily XML reports detailing who is sending email using your domain.

Why Alignment Matters for SendGrid

For DMARC to pass, the domain found in the visible "From" header of your email must match (or align with) the domain authenticated in the Return-Path (for SPF) or the DKIM signing domain. By default, SendGrid handles the Return-Path for basic setups, but completing manual domain authentication ensures your root domain is fully aligned with all outbound mail.

Step-by-Step Guide to SendGrid DMARC Configuration

Implementing DMARC requires creating a single DNS TXT record at your domain registrar or DNS hosting provider. Follow these steps to generate, publish, and verify your policy.

Step 1: Draft Your DMARC TXT Record Syntax

A standard DMARC record consists of several tags separated by semicolons. A secure starting policy begins in monitoring mode (p=none) so you can review delivery reports before enforcing restrictions.

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

Here is what each tag means:

  • v=DMARC1: Specifies the protocol version (must always be DMARC1).
  • p=none: Instructs receiving servers to take no special action on failing emails, only send reports. (Later stages can move to p=quarantine or p=reject).
  • rua: The destination email address where aggregate XML reports are sent.
  • pct=100: Applies the policy to 100% of your outbound email traffic.

Step 2: Log In to Your DNS Provider

Navigate to your domain registrar or DNS hosting provider (such as Cloudflare, AWS Route 53, GoDaddy, or Google Cloud DNS). Access the zone file or DNS management dashboard for your sending domain (e.g., example.com). Note that exact menu paths vary by provider, but you will generally look for "DNS Management," "Zone Editor," or "Manage DNS Records."

Step 3: Create the DNS TXT Record

Add a new record using the following parameters:

Field Type Host / Name Value / Target / Content TTL
TXT _dmarc or _dmarc.example.com v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com; Auto / 3600

Note: Depending on your DNS interface, entering _dmarc into the hostname field will automatically append your root domain. Avoid entering _dmarc.example.com. unless your provider requires fully qualified domain names (ending with a dot).

Step 4: Save and Propagate

Save the record. DNS propagation generally takes anywhere from a few minutes up to 24 hours depending on your global TTL settings.

Verifying Your DMARC Configuration

Once your record is published, you must verify that receiving servers can read it correctly. You can use command-line utilities to query your DNS records instantly.

Using dig (Linux and macOS)

Open your terminal and run the following command to query your domain's DMARC TXT record:

dig TXT _dmarc.example.com +short

Expected Output:

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

Using PowerShell (Windows)

If you are using Windows, open PowerShell and run the Resolve-DnsName cmdlet:

Resolve-DnsName -Name _dmarc.example.com -Type TXT

Expected Output:

Name                                     Type TTL   Section    Strings
----                                     ---- ---   -------    -------
_dmarc.example.com                       TXT  3600  Answer     {v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com;}

Moving from Monitoring to Enforcement

After running your p=none policy for 2 to 4 weeks, you will receive daily XML files containing authentication data from providers like Google, Microsoft, and Yahoo. Parse these reports to identify legitimate sending sources (such as SendGrid, CRM tools, and transactional platforms) and unauthorized spoofers.

Once you confirm that all legitimate mail passes SPF and DKIM alignment, upgrade your policy progressively:

  1. Quarantine (p=quarantine): Tells receiving servers to send failing emails straight to the recipient's spam folder.
    v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@example.com; pct=100
    
  2. Reject (p=reject): Completely blocks failing emails from reaching the mailbox server, offering maximum protection against phishing.
    v=DMARC1; p=reject; rua=mailto:dmarc-reports@example.com; pct=100
    

Common Mistakes and How to Fix Them

Even experienced engineers occasionally run into configuration pitfalls when publishing DMARC records. Avoid these frequent errors:

  • Publishing multiple DMARC records: A domain can only have one active DMARC record. If you publish more than one, receiving mail servers will ignore both, leaving your domain unprotected. Ensure only a single _dmarc TXT record exists.
  • Typographical errors in tag names: Tags are case-sensitive and strict. Writing policy=none instead of p=none or version=DMARC1 instead of v=DMARC1 will cause the record to fail validation.
  • Using external reporting domains without RUA authorization: If you send aggregate reports (rua) to a domain different from your sending domain, the target domain must explicitly authorize it by publishing a DNS record allowing the report transfer (known as external domain validation).
  • Forgetting SendGrid Subdomain Authentication: If you authenticated a custom sending subdomain with SendGrid (e.g., em.example.com), ensure your DMARC record is published at the root domain (example.com), as DMARC evaluates the header From domain, not the Return-Path subdomain.

Quick Configuration Checklist

  • SendGrid SPF and DKIM CNAME records fully verified inside the SendGrid dashboard.
  • DMARC record generated using standard tags (v=DMARC1, p=none, rua).
  • Record published at _dmarc.example.com via your DNS provider.
  • Verified record propagation using dig or PowerShell.
  • Monitored aggregate reports for at least two weeks before upgrading to p=quarantine or p=reject.

Frequently asked questions

Where should I publish my SendGrid DMARC record?

You must publish your DMARC record at your root domain (e.g., `_dmarc.example.com`), regardless of whether you send mail directly from your root domain or via a subdomain authenticated through SendGrid. DMARC checks alignment against the visible From header address seen by your recipients.

Should I start with p=none or p=reject for SendGrid?

You should always start with monitoring mode (`p=none`). This allows you to collect aggregate XML reports and discover all services sending email on behalf of your domain without risking legitimate email delivery failures. Move to `p=quarantine` and `p=reject` only after reviewing reports for a few weeks.

What happens if I have multiple DMARC records in my DNS?

If your DNS zone contains more than one `_dmarc` TXT record, mailbox providers like Google and Microsoft will consider the configuration invalid and ignore all DMARC instructions. Always maintain a single, consolidated DMARC record per domain.

How long does it take for SendGrid DMARC changes to take effect?

DNS changes depend entirely on your domain registrar's Time To Live (TTL) settings. While some providers update records in seconds, global propagation can take up to 24 hours before all receiving mail servers recognize the new DMARC policy.

Do I need separate DMARC records for SPF and DKIM?

No, DMARC is a single, unified policy record that references your existing SPF and DKIM setups. You do not need a separate DMARC record for each protocol; instead, your single DMARC record evaluates alignment for both.

Related articles

Free tools