A third-party service passes DMARC for your domain only when it produces an aligned result: either a DKIM signature with d= set to your domain (or a subdomain of it), or an SPF pass on a return-path domain that is yours. Adding a vendor's include to your SPF record is not enough on its own, because most services use their own bounce domain, so SPF passes for them and not for you. The reliable fix is to set up the vendor's domain authentication, which publishes DKIM keys under your domain.
This guide explains how that works, shows the records for several common services, and covers how to add senders without breaking the SPF 10-lookup limit.
Why vendor mail fails DMARC by default
A message has two sender domains:
- The visible From (
From: news@example.com), which your recipients see and DMARC protects. - The envelope sender or return path (
MAIL FROM), where bounces go. SPF checks this one.
When a marketing platform sends for you without any setup, it typically uses its own domain for both the return path and the DKIM signature:
From: news@example.com
Return-Path: bounce-123@mail.vendor.example
DKIM-Signature: v=1; d=vendor.example; s=k1; ...
Authentication-Results: mx.receiver.example;
spf=pass smtp.mailfrom=mail.vendor.example;
dkim=pass header.d=vendor.example;
dmarc=fail header.from=example.com
SPF and DKIM both pass, but neither domain matches example.com, so DMARC fails. This is the most common pattern in aggregate reports for a new domain, and the main reason a rollout stalls before p=reject. The alignment guide covers the rules in detail.
Two ways to align a vendor
Aligned DKIM (preferred)
You publish DNS records the vendor gives you, usually CNAMEs under _domainkey that point to keys the vendor hosts and rotates. The vendor then signs with d=example.com:
DKIM-Signature: v=1; d=example.com; s=s1; ...
Authentication-Results: mx.receiver.example;
dkim=pass header.d=example.com;
dmarc=pass header.from=example.com
DKIM is the better target because it survives forwarding. SPF breaks whenever a message is relayed through another server, while an intact DKIM signature still verifies. RFC 9989 goes further: domains that publish p=reject must not rely on SPF alone and must apply valid DKIM signatures.
Aligned SPF (custom return path)
Some vendors let you set a custom return-path domain, often called a bounce domain, MAIL FROM domain or envelope domain. You point a subdomain such as bounce.example.com at the vendor with a CNAME or MX record. Under relaxed alignment, bounce.example.com aligns with example.com, so the vendor's SPF pass now counts for DMARC.
A useful side effect: the vendor's SPF include goes on the bounce subdomain, not on your root record. That keeps your root SPF record short.
Which to choose
| Situation | Do this |
|---|---|
| Vendor offers domain authentication | Set up DKIM, and the custom return path if offered |
| Vendor offers DKIM only | DKIM alone is enough for a DMARC pass |
| Vendor offers custom return path only | Use it, and ask about DKIM support |
| Vendor offers neither | Send from a subdomain you can isolate, or replace the vendor |
Records for common services
Each vendor generates account-specific values. Copy them from the vendor's setup screen rather than from any guide, including this one. The formats below match each vendor's documentation as of this writing.
SendGrid (Twilio)
SendGrid calls this domain authentication. With automated security on, which is the default, it gives you CNAME records:
em1234.example.com. IN CNAME u1234567.wl123.sendgrid.net.
s1._domainkey.example.com. IN CNAME s1.domainkey.u1234567.wl123.sendgrid.net.
s2._domainkey.example.com. IN CNAME s2.domainkey.u1234567.wl123.sendgrid.net.
The em record is the return-path subdomain, which gives aligned SPF. The two _domainkey records give aligned DKIM. You do not add include:sendgrid.net to your root SPF record with this setup. You can choose your own label for the return-path subdomain instead of the random em value. With automated security off, SendGrid gives you an MX and SPF TXT record for the return path and a DKIM TXT record instead, and you maintain them yourself.
Amazon SES
SES handles the two halves separately.
Easy DKIM publishes three CNAME records per domain and signs with a 2048-bit key by default:
abcdef123._domainkey.example.com. IN CNAME abcdef123.dkim.amazonses.com.
Each of the three records has its own token. The hosted zone after the token varies by AWS Region and identity, so copy the values from the Publish DNS records table in the SES console.
Custom MAIL FROM domain gives aligned SPF. Pick a subdomain that you do not use for sending or receiving mail, then publish exactly one MX record and one SPF record on it:
bounce.example.com. IN MX 10 feedback-smtp.us-east-1.amazonses.com.
bounce.example.com. IN TXT "v=spf1 include:amazonses.com ~all"
Use the region your SES account sends from. In the SES console you also choose what happens if the MX record goes missing: fall back to the default amazonses.com MAIL FROM (mail keeps flowing but SPF stops aligning) or reject the send. Without a custom MAIL FROM domain, SES uses a subdomain of amazonses.com, which never aligns.
Mailchimp
Mailchimp's domain authentication adds two CNAME records for DKIM and checks for a DMARC TXT record. As of this writing, the path is your profile icon > Account & billing > Domains > Start authentication next to a verified domain. Mailchimp shows the exact host names and targets in the account. Mailchimp states that SPF is already set up on its own sending domains, so your DMARC pass for Mailchimp mail comes from the aligned DKIM signature. Do not add a Mailchimp include to your root SPF record unless Mailchimp's current instructions ask for one.
Mailchimp Transactional (formerly Mandrill) is a separate product with its own DKIM records. Do not mix the two.
HubSpot
HubSpot calls this connecting an email sending domain. As of this writing: Settings > Content > Domains & URLs > Email Sending tab > Connect sending domain. HubSpot generates two DKIM CNAME records, an SPF TXT entry, an MX record and a DMARC check. If you already have an SPF record, HubSpot instructs you to add its include to the existing record rather than create a second one. For DMARC, the DKIM records are what matter, since they make HubSpot sign with your domain.
If your DNS host appends the domain automatically, enter only the part HubSpot shows before your domain, or you end up with a doubled host name.
Google Workspace and Microsoft 365
Mailbox providers are third-party senders too. Their setup has its own guides: Google Workspace and Microsoft 365.
Staying under the SPF 10-lookup limit
SPF allows at most 10 DNS-querying terms per evaluation (include, a, mx, exists, redirect, plus anything nested inside includes). Past that, the result is PermError and SPF stops counting as a pass anywhere. Every vendor that tells you to add an include brings you closer to the limit.
Ways to stay under it, in order of preference:
- Use custom return-path domains. The vendor's SPF lives on
bounce.example.comorem1234.example.com, each with its own 10-lookup budget. Your root record does not grow. - Rely on DKIM where the vendor offers it. If a vendor signs with your domain and does not use your root domain as the return path, its include on your root record adds nothing to DMARC. Check the reports before removing it, since some receivers still look at SPF on its own.
- Remove services you no longer use. Old includes are the most common cause of PermError.
- Move bulk senders to a subdomain. Sending newsletters from
news.example.comgives that stream its own SPF record, its own DMARC policy if needed, and separate reputation. Microsoft recommends this for services you do not control directly. - Replace an include with
ip4/ip6only for vendors with small, stable, documented ranges. This is often called flattening. It breaks silently when the vendor changes IPs, so avoid it for large cloud senders.
The SPF guide shows how to count lookups by hand. The SPF checker expands every include and shows the total.
A process for each new sender
- Find it. New senders usually show up first in DMARC aggregate reports as an unfamiliar source with an SPF pass on a vendor domain.
- Confirm it is legitimate. Ask who signed up for the tool. Unknown sources that are not yours should be left failing.
- Set up domain authentication in the vendor's account and publish the records it gives you.
- Verify the records with the DKIM checker, using the selector the vendor gave you.
- Send a test and check the headers:
dkim=pass header.d=example.comanddmarc=pass. - Watch the next reports to confirm the source now passes with alignment.
Common mistakes
- Adding the include and stopping there. SPF passes on the vendor's bounce domain, which does not align.
- Creating a second SPF record for the new vendor. Both records become invalid.
- Strict alignment with a bounce subdomain.
aspf=srequires an exact match, sobounce.example.comno longer aligns withexample.com. Keep relaxed alignment unless you have a specific reason. - Deleting vendor CNAMEs during DNS cleanup. They look unused but carry the keys the vendor signs with.
- Proxying CNAMEs through a CDN. DKIM and return-path CNAMEs must resolve to the vendor's hostname, not to a proxy.
Check any sender's alignment by scanning your domain with the free DMARC checker.