Skip to content
SpoofKiller
Provider setup guides

DMARC for SendGrid: Domain Authentication That Aligns

Use SendGrid domain authentication so SPF and DKIM align with your own domain and DMARC passes.

Reading time
6 min read
Last updated
Updated
Two hands patching cables into a switchboard whose lamps glow green, amber, and red.
Three patch cables, correctly plugged, and the call is announced under your name instead of the operator's.
In this guideShow 7 sections

Somewhere in Gmail there is a line of small gray type that reads “via sendgrid.net.” It appears beside the name of a company that spent real money on a logo, a brand voice, and a newsletter strategy. The gray type is the mail system’s way of saying: this message claims to be from them, but the paperwork says otherwise.

The paperwork is fixable. SendGrid calls the fix Domain Authentication, and it consists of three DNS records. Publish them and your mail stops borrowing SendGrid’s identity and starts using your own, which is what DMARC has been asking for all along.

Why unauthenticated SendGrid mail fails DMARC

DMARC passes when SPF or DKIM passes and the passing domain matches the domain in your visible From address. SendGrid is very good at the first half. Its servers pass SPF. Its signatures verify. The trouble is whose name is on them.

Without Domain Authentication, a message from news@example.com looks like this to a receiver:

CheckDomain checkedResultAligned with example.com?
SPFA sendgrid.net return-pathPassNo
DKIMd=sendgrid.netPassNo
DMARCexample.comFailNothing to align

Two passes and a failure. If that table looks unjust, the article on DMARC alignment explains why the rule exists: without it, anyone with a SendGrid account could pass DMARC for your domain.

One clarification saves an afternoon of confusion. Single Sender Verification is not Domain Authentication. Clicking a confirmation link proves you own an inbox. It publishes nothing in DNS and aligns nothing. It is fine for a first test and unfit for a domain with a DMARC policy.

Step 1: Run Domain Authentication

In SendGrid, go to Settings → Sender Authentication and choose to authenticate your domain. The wizard asks who hosts your DNS, which domain you send from, and whether to brand links. Answer, and it generates records. With the default settings you get three CNAMEs that look roughly like this:

Type    Host                           Points to
CNAME   em1234.example.com             u1234567.wl123.sendgrid.net
CNAME   s1._domainkey.example.com      s1.domainkey.u1234567.wl123.sendgrid.net
CNAME   s2._domainkey.example.com      s2.domainkey.u1234567.wl123.sendgrid.net

Those numbers are invented for the example. Yours are specific to your account. Copy every host and value from the SendGrid screen, not from here.

Each record has a job:

  • The mail subdomain (em1234 in the example) becomes your return-path. Receivers check SPF against it, follow the CNAME, and find SendGrid’s SPF record. SPF now passes for a subdomain of yours.
  • The two selector records, s1 and s2, delegate DKIM. SendGrid holds the private keys and publishes the public halves at the far end of the CNAMEs. Your mail is signed with d=example.com.

Both identities now belong to your organizational domain. Both align. DMARC needs one; you have two, which is how you survive the day a forwarder breaks one of them.

Automated security, and why to leave it on

The wizard has an advanced option called automated security. It is on by default, and it is the reason you receive CNAMEs instead of TXT records. Because the records are pointers, SendGrid can rotate your DKIM keys on its side without you touching DNS. That is why there are two selectors: one in use, one waiting.

Turn it off and SendGrid gives you TXT and MX records to manage yourself. Mail still authenticates. But key rotation becomes your job, and it is the sort of job that gets done once, during onboarding, by someone who has since left. Leave automated security on unless your DNS host cannot create CNAMEs at underscore names.

Two other advanced options are worth knowing. If s1 and s2 are already taken by another service on your domain, you can choose a custom DKIM selector. And you can pick a custom return-path label if em1234 offends your sense of order. Neither changes how alignment works.

Step 2: Publish the records and verify

Add the three CNAMEs at your DNS host, then return to SendGrid and press Verify. If verification fails, the cause is nearly always one of these:

SymptomLikely causeFix
All three records failHost appended your domain, creating em1234.example.com.example.comEnter only the label, such as em1234 or s1._domainkey
Records exist but do not verifyCNAMEs are proxied through a CDNSet them to DNS only; see the Cloudflare DNS guide
DKIM records fail, mail subdomain passesDNS host rejects or mangles underscoresUse the host’s documented method or disable automated security
Verified yesterday, failing todaySomeone tidied up “unused” CNAMEsRestore them and label them in your DNS notes

Do not rely on the green checkmark alone. Run both selectors through the DKIM checker to confirm a key resolves, and use the DNS propagation checker if SendGrid and your DNS host disagree about what exists.

Your root SPF record

With automated security on, the return-path lives at your mail subdomain, and SPF is evaluated there. Your root record is not consulted for SendGrid mail, so you generally do not need to add a SendGrid include to it. If one is there from an older setup, it is spending part of your ten-lookup budget. Count what you have with the SPF checker before deciding, and confirm from your reports which return-path your mail actually uses.

Link branding

Link branding is a separate feature with its own CNAMEs. It rewrites click-tracking and open-tracking URLs to use your domain instead of SendGrid’s. It has nothing to do with DMARC. It is still worth doing, since a link that matches the sender looks less like a trap.

Reverse DNS

If you pay for a dedicated IP, SendGrid offers reverse DNS setup so the address resolves to a name on your domain. This is also separate from DMARC. It affects how receivers judge the server, which is a matter for deliverability troubleshooting.

Step 3: Confirm DMARC passes

Send a message to a mailbox you control and open the raw headers. Paste them into the email header analyzer and look for three things: spf=pass naming your mail subdomain, dkim=pass with header.d=example.com, and dmarc=pass. The gray “via” text should be gone.

Then check the wider picture. If you have no DMARC record, the DMARC generator will produce a monitoring-only record to start with:

_dmarc.example.com  TXT  "v=DMARC1; p=none; rua=mailto:reports@example.com"

Aggregate reports from participating receivers will show SendGrid’s IP addresses and whether each identity aligned. Reading them is the subject of Understanding DMARC Reports. If you would rather not read XML, SpoofKiller’s DMARC monitoring names the sender, tallies the passes, and tells you when SendGrid mail stops aligning.

A verified checkmark tells you the records existed when you clicked. Reports tell you whether they still do.

Subusers, multiple domains, and strict mode

Domain Authentication belongs to a domain and an account. If you use subusers, each needs an authenticated domain assigned to it, or its mail falls back to SendGrid’s defaults and fails alignment while the parent account looks perfect. Every additional sending domain needs its own run through the wizard.

A note on strict alignment. The return-path is a subdomain, so aspf=s in your DMARC record will fail SPF alignment for all SendGrid mail. DKIM with adkim=s requires the From domain to equal the signing domain exactly. Authenticate example.com and send from news@mail.example.com, and strict DKIM fails as well. Relaxed alignment, the default, accepts both.

When SendGrid is aligned, repeat the exercise for everything else that sends as you. Then follow the staged route to p=reject. The sending sources documentation explains how SpoofKiller identifies each service along the way.

FAQ

Questions about DMARC for SendGrid

Short answers to what readers ask next. If yours is missing, write to us and a person will reply.

Ask a question

Free, no obligation

Want a second pair of eyes on your records?

Send us your domain. We will look at its DMARC, SPF, and DKIM setup and write back, in plain English, with what we found and what to fix first.

  • A person reads your records, not a script
  • Specific fixes, in order of importance
  • No sales sequence afterward

We use your details to reply. Nothing else.

Reading about it is the slow way.

Run the free check and see your own domain's DMARC, SPF, and DKIM in the time it took to read this paragraph. No account, no card.