Opens in a new tab

HubSpot SPF, DKIM and DMARC setup

HubSpot’s marketing email uses HubSpot’s own return path on its shared network, so DMARC passes through DKIM: two CNAME records, hs1 and hs2, that you publish when you connect your email sending domain. HubSpot also asks for an SPF include that is specific to your account.

SPFinclude:<HubID>.spf0<n>.hubspotemail.net
DKIMCNAMEs hs1-<HubID> and hs2-<HubID>
Bounce domainHubSpot’s own on the shared network
Set up inSettings → Content → Domains & URLs → Email Sending

Is your domain set up for HubSpot?

We read your SPF record, look for HubSpot’s DKIM key and check DMARC. Nothing is stored.

SPF for HubSpot

HubSpot gives each account its own SPF include, shaped like include:123456.spf03.hubspotemail.net — the number is your Hub ID. Copy the exact value from the connect-domain screen and add it to your existing SPF record.

On HubSpot’s shared network the return path is HubSpot’s own and “cannot be customized”, so SPF does not align with your domain for DMARC. A custom return-path is available on Marketing Hub Enterprise.

If you have no SPF record yet, publish this TXT record on @ (the domain itself):

v=spf1 include:<HubID>.spf0<n>.hubspotemail.net ~all

If you already have one, add include:<HubID>.spf0<n>.hubspotemail.net to it, before the ~all or -all at the end. A domain must have exactly one SPF record: a second one makes both fail.

DKIM for HubSpot

In HubSpot, go to Settings → Content → Domains & URLs → Email Sending → Connect, and publish the records it lists. The DKIM selectors carry your Hub ID, so they are different for every account.

Until the domain is connected, HubSpot will not send with your domain in the From address.

NameTypeValue
hs1-<HubID>._domainkeyCNAME<yourdomain-com>.hs<n>a.dkim.hubspotemail.net
hs2-<HubID>._domainkeyCNAME<yourdomain-com>.hs<n>b.dkim.hubspotemail.net

The exact values come from HubSpot; copy them from there. Placeholders are in angle brackets.

Bounce domain and DMARC

Because the return path is HubSpot’s own, HubSpot mail passes DMARC only through DKIM. Both hs1 and hs2 CNAMEs must be in place before you move your DMARC policy to quarantine or reject.

No DMARC record yet? Start with one that only reports, read the reports for a couple of weeks, then tighten it: build it with the DMARC generator.

Common mistakes

  • DNS hosts that append the domain, producing hs1-123456._domainkey.yourdomain.com.yourdomain.com; enter only hs1-123456._domainkey.
  • On Cloudflare, turn proxying off for the CNAMEs.
  • Adding a second SPF or DMARC record instead of editing the existing one.

Questions

Why is the SPF include different from what I see online?

HubSpot gives each account its own include containing the Hub ID. Copy it from your connect-domain screen rather than from an article.

Sources

Checked against HubSpot’s own documentation on 25 September 2026:

See every service’s mail pass or fail

Point your DMARC reports at us and we name every server sending as your domain, with what passes, what fails and the exact fix. Free for your first domain.

Create a free account