SPF, DKIM & DMARC for HubSpot.
HubSpot authenticates your domain by "connecting an email sending domain," and the heart of that flow is CNAME-based DKIM, not a shared SPF line. In Settings > Content > Domains & URLs > Email Sending you connect the domain your marketing From address uses; HubSpot generates two account-specific CNAME records (hs1._domainkey and hs2._domainkey) that delegate rotating DKIM keys back to HubSpot, plus a recommended SPF include and a DMARC record you add yourself. Once those CNAMEs resolve, HubSpot signs mail as d=yourdomain.com, DMARC passes on DKIM alignment, and the "on behalf of" / "via hubspotemail.net" notice Gmail attaches to unauthenticated HubSpot mail disappears. The catch that surprises people: on shared sending, HubSpot keeps its own Return-Path on hubspotemail.net, so SPF never aligns to your domain by default — DKIM is the mechanism that carries your DMARC pass.
Why authenticate HubSpot?
Authenticating your HubSpot sending domain isn't housekeeping — it's the difference between the inbox and the spam folder, and HubSpot now effectively requires it. Since February 2024, Gmail and Yahoo have required every bulk sender (roughly 5,000+ messages a day to consumer inboxes) to pass SPF, DKIM, and DMARC with alignment, and Microsoft extended the same rules to Outlook.com/Hotmail/Live in 2025. HubSpot responded by pushing domain connection hard: campaigns from free public From addresses (gmail.com, yahoo.com) are blocked, and an unconnected domain sends under HubSpot's own identity — drawing a "via hubspotemail.net" notice while your reputation pools with every other unauthenticated HubSpot sender. There's a HubSpot-specific twist that makes the two DKIM CNAMEs non-negotiable: on shared sending HubSpot processes bounces on its own Return-Path (a hubspotemail.net bounce domain), so SPF is always checked against HubSpot's domain, never your From domain. SPF may raw-"pass," but it does not align — and DMARC only counts SPF when it aligns. That leaves DKIM, signed as d=yourdomain.com via the hs1/hs2 selectors, as the only aligned mechanism carrying your DMARC pass. Skip the CNAMEs and you have no aligned authentication at all, and the sending reputation you build never accrues to your own domain.
The SPF reality for HubSpot
HubSpot is a per-account provider, closer to Amazon SES than to a single-shared-include sender like Google Workspace or Microsoft 365. There is no one "include:_spf.hubspotemail.net" that every customer pastes: when you connect an email sending domain, HubSpot generates account-specific values — two DKIM CNAMEs whose targets embed a portal-specific selector version (yourdomain-com.hs01a.dkim.hubspotemail.net, hs01b, and so on), plus an account-specific SPF include of the form include:NNNNNN.spfNN.hubspotemail.net (where NNNNNN is your Hub ID, e.g. include:123456.spf03.hubspotemail.net). HubSpot does recommend adding that SPF include to your From-address domain's root SPF, and that's genuinely useful — but here's the nuance almost every old tutorial gets wrong: it will not, on its own, make DMARC pass. Because HubSpot owns the Return-Path (bounces are processed on hubspotemail.net for shared senders), SPF is evaluated against HubSpot's bounce domain, so it raw-passes for hubspotemail.net but does not align to your organizational domain — and DMARC only credits an aligned SPF result. That is exactly why HubSpot leads with two DKIM CNAMEs: DKIM signed as d=yourdomain.com is the mechanism that aligns and carries your DMARC pass, and the SPF include is belt-and-suspenders for the raw SPF check. Two rules follow. First, copy the exact account-specific include from your portal (Domains & URLs > Advanced Options > Copy SPF record) — never guess a generic value; the NNNNNN and spfNN segments are yours. Second, keep exactly one SPF TXT record on the domain: merge the HubSpot include into your existing v=spf1 line rather than publishing a second SPF record (two is a PermError), and it counts toward your 10-lookup limit. If you actually want SPF to align too, HubSpot offers a custom Return-Path — but it's a Marketing Hub Enterprise feature, and under strict DMARC alignment it only works when your sending domain is a subdomain (mail.company.com), not the root company.com.
Two ways to set it up
DKIM domain connection (required, carries DMARC)
- Two CNAMEs (hs1._domainkey, hs2._domainkey) delegate rotating DKIM keys to HubSpot
- Signs mail as d=yourdomain.com, so DKIM aligns and DMARC passes on DKIM
- Adds zero DNS lookups to your root SPF — the CNAMEs live on their own selectors
- HubSpot rotates the keys behind the selectors; you never re-edit DNS
SPF include + custom Return-Path (supplementary)
- Account-specific include:NNNNNN.spfNN.hubspotemail.net satisfies the raw SPF check
- Does NOT align by default — HubSpot's Return-Path is on hubspotemail.net
- Costs one of your 10 SPF lookups when merged into your root record
- SPF only aligns if you enable a custom Return-Path (Marketing Hub Enterprise) AND send from a subdomain
Step by step
- 1
Open the Email Sending settings
Click the settings gear, then in the left sidebar go to Content > Domains & URLs and open the Email Sending tab. (In some portals this lives under Website > Domains & URLs.) This is where HubSpot manages connected sending domains — SPF and DMARC still get added at your DNS host, not here.
- 2
Connect a sending domain
Click Connect a sending domain (or Connect a new domain), and enter the domain your marketing email From address uses. Decide root vs subdomain now: connect yourdomain.com for the simplest setup, or a subdomain like mail.yourdomain.com if you want the option of a custom Return-Path that makes SPF align too (an Enterprise feature).
- 3
Choose automatic or manual DNS setup
HubSpot offers a guided/automatic path for supported DNS hosts, or a manual path where you copy the records and paste them at your registrar yourself. Both create the same records. Pick manual if you want to review the exact values before publishing.
- 4
Copy your account-specific records
HubSpot displays two DKIM CNAME records (Host hs1._domainkey and hs2._domainkey, each with a hubspotemail.net target) plus the recommended SPF include. These values are unique to your portal — copy the Host and target for each exactly. Some accounts show the selectors as hs1-<portalID>._domainkey / hs2-<portalID>._domainkey.
- 5
Add the two DKIM CNAMEs
At your DNS host, create both records as type CNAME: Host hs1._domainkey -> Value yourdomain-com.hs01a.dkim.hubspotemail.net, and Host hs2._domainkey -> Value ...hs01b... (use the exact targets HubSpot shows). Keep the type as CNAME — don't switch to TXT, and don't shorten or merge the two values.
- 6
Fix host labels and the Cloudflare proxy
If your registrar auto-appends your domain, enter just the label (hs1._domainkey, not hs1._domainkey.yourdomain.com) to avoid doubling. On Cloudflare, set each CNAME to DNS only (grey cloud) — an orange-cloud proxied CNAME won't resolve to hubspotemail.net and the domain won't connect.
- 7
Merge HubSpot's SPF include into your one SPF record
HubSpot recommends adding its SPF include to your From-address domain. Add include:NNNNNN.spfNN.hubspotemail.net (your exact value) into your existing root SPF TXT, e.g. v=spf1 include:_spf.google.com include:123456.spf03.hubspotemail.net ~all. Never create a second SPF record — merge into the single v=spf1 line. Remember this satisfies the raw SPF check but does not align.
- 8
Publish a DMARC record
HubSpot doesn't create DMARC and its support can't help with it — you own this record. Add a TXT record at host _dmarc with v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com. p=none is monitor-only, so nothing about delivery changes while you confirm HubSpot passes DKIM-aligned. Keep just one _dmarc record; subdomains inherit it.
- 9
Verify the domain in HubSpot
Back on the Email Sending tab, let HubSpot re-check DNS (Continue setup / the status refreshes). Propagation is usually minutes but can take up to 24–48 hours; the domain flips to Connected once both CNAMEs resolve. If it stalls, re-check the exact CNAME targets and that they aren't proxied.
- 10
Send a test and set your From address
Send a test from HubSpot to a Gmail account, open it, and choose the three-dot menu > Show original: you want DKIM: PASS with d=yourdomain.com and DMARC: PASS (SPF will likely show hubspotemail.net — that's expected, DKIM carries the alignment). Then set your marketing email From address and email preference/subscription domain to the connected domain so mail actually uses it.
Records to add
HubSpot generates the exact values in its setup wizard — these show the shape of what you'll add at your DNS host.
| Type | Host | Value |
|---|---|---|
| CNAME | hs1._domainkey | yourdomain-com.hs01a.dkim.hubspotemail.netDKIM key 1 — account-specific. Illustrative: copy the exact target from your HubSpot portal (the hs01a selector-version segment varies by account; some accounts label the host hs1-<portalID>._domainkey). |
| CNAME | hs2._domainkey | yourdomain-com.hs01b.dkim.hubspotemail.netDKIM key 2 — the paired selector lets HubSpot rotate keys. Illustrative — use the exact hs2 target HubSpot shows; don't shorten or merge with hs1. |
| TXT | @ | v=spf1 include:123456.spf03.hubspotemail.net ~allSPF is per-account (include:NNNNNN.spfNN.hubspotemail.net, where NNNNNN is your Hub ID) and illustrative — copy yours from Domains & URLs > Advanced Options. Recommended but supplementary: it satisfies the raw SPF check but does NOT align (HubSpot owns the Return-Path). Merge into your single root SPF; costs ~1 lookup. |
| TXT | _dmarc | v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.comYou add this yourself — HubSpot never creates it and support can't help. One per domain; DKIM alignment is what makes it pass for HubSpot. Start at p=none, then tighten. |
Keep exactly one SPF (v=spf1) TXT record on your root domain — merge every sender into it. Two SPF records is itself an error.
The 10-lookup budget
SPF is capped at a hard 10 DNS lookups — go over and it returns a permerror and stops validating everywhere. Here's what HubSpot's setup costs against that budget.
HubSpot adds 1 of your 10 lookups; ip4: and ip6: mechanisms are free.
DKIM
DKIM is HubSpot's primary — and effectively required — authentication, and it's what makes DMARC pass, because HubSpot's SPF doesn't align. When you connect an email sending domain, HubSpot hands you two CNAME records: Host hs1._domainkey and hs2._domainkey, each pointing to an account-specific hubspotemail.net target of the form yourdomain-com.hsNNa.dkim.hubspotemail.net and ...hsNNb... (the domain-with-dashes prefix and the hsNN selector-version segment are unique to your portal; some accounts label the hosts hs1-<portalID>._domainkey and hs2-<portalID>._domainkey). Because these are CNAMEs delegated to HubSpot — not TXT records you paste — HubSpot holds the private keys and uses the two selectors to rotate them automatically, so you never re-edit DNS after the initial setup. Publish both (a single selector is not enough), keep the type as CNAME, and don't shorten, reformat, or merge the two values. On Cloudflare, set them to DNS only (grey cloud) so they resolve to hubspotemail.net. Once both resolve and HubSpot shows the domain Connected, outbound mail is signed with d=yourdomain.com via the hs1/hs2 selectors — that aligned DKIM signature is the mechanism that carries your DMARC pass, which is why you can't rely on SPF alone here.
DMARC
DMARC is a separate policy TXT record that HubSpot does not create — and HubSpot Support explicitly states it can't help with DMARC setup, so this one is on you. Publish it at _dmarc.yourdomain.com starting with v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com. p=none is monitor-only: it changes nothing about delivery while you watch the aggregate (rua) reports to confirm HubSpot is passing DKIM aligned to your domain. Because HubSpot's SPF is checked against its own hubspotemail.net Return-Path and therefore doesn't align, expect your reports to show HubSpot passing on DKIM only — that's normal and sufficient for a DMARC pass. Keep exactly one _dmarc record for the whole organizational domain; a subdomain you send from (e.g. mail.yourdomain.com) is considered authenticated under the root policy through DMARC inheritance, though you can override a specific subdomain with its own _dmarc record or the sp= tag. Once every legitimate sender — HubSpot plus Google Workspace, Microsoft 365, or any transactional relay — is passing aligned, tighten the policy to p=quarantine and eventually p=reject to actually block spoofing.
Check it actually worked
Don't trust HubSpot's "Connected" badge alone — confirm it on a real message. Send a test from HubSpot to a Gmail account, open it, and choose the three-dot menu > Show original. You want DKIM: PASS with signed-by / d=yourdomain.com (the tell-tale failure is d=hubspotemail.net or an "on behalf of" line, which means the CNAMEs aren't verified or the From address isn't on the connected domain) and DMARC: PASS. SPF will typically show hubspotemail.net rather than your domain — that is expected because HubSpot owns the Return-Path, and DKIM is what carries the alignment, so a passing-but-unaligned SPF here is not a problem. You can spot-check the raw records with dig CNAME hs1._domainkey.yourdomain.com and dig TXT _dmarc.yourdomain.com. Finally, run the domain through Qualisend's domain health check to confirm both DKIM CNAMEs, your merged SPF, and the DMARC record all resolve and that SPF stays under the 10-lookup limit — and once aggregate reports start arriving, drop one into the DMARC report analyzer to verify HubSpot shows up as a DKIM-aligned, passing source.
Common gotchas
- DNS setup
SPF doesn't align on HubSpot: on shared sending the default Return-Path is on hubspotemail.net, so SPF raw-passes for HubSpot but not for your domain. The two DKIM CNAMEs (d=yourdomain.com) are the ONLY aligned mechanism — adding the SPF include by itself will not get you a DMARC pass.
- Coverage
Copy the exact account-specific values. The DKIM targets (yourdomain-com.hsNNa/hsNNb.dkim.hubspotemail.net) and the SPF include (include:NNNNNN.spfNN.hubspotemail.net) are unique to your portal. Guessing a generic include:_spf.hubspotemail.net or the wrong selector-version segment breaks verification.
- Coverage
Custom Return-Path is Enterprise-only and subdomain-only: the custom Return-Path that would make SPF align is a Marketing Hub Enterprise feature, and under strict DMARC alignment it's supported only when you send from a subdomain like mail.company.com — not the root company.com. If SPF alignment matters to you, you need both.
- DNS setup
HubSpot won't help with DMARC. HubSpot Support explicitly can't assist with the _dmarc record, and HubSpot never creates it — you must publish one yourself and start at p=none.
- DNS setup
Cloudflare proxy breaks the CNAMEs: set both hs1._domainkey and hs2._domainkey to DNS only (grey cloud). An orange-cloud proxied CNAME won't resolve to hubspotemail.net and the domain won't connect.
- DNS setup
Host-field doubling: many registrars auto-append your domain, so entering hs1._domainkey.yourdomain.com becomes hs1._domainkey.yourdomain.com.yourdomain.com. Enter just the label (hs1._domainkey, hs2._domainkey) when the panel adds the domain for you.
- Breaks auth
Keep exactly one SPF TXT record. Merge HubSpot's include into your existing v=spf1 line — two SPF records is a PermError — and remember it counts toward the RFC 7208 limit of 10 DNS lookups.
- Coverage
Connecting the domain isn't the same as using it. After DNS verifies, set your marketing email's From address (and the email preference/subscription domain) to the connected domain, or your mail keeps sending unaligned under HubSpot's identity.
Build your SPF record
HubSpot doesn't need an SPF include: on your root domain — use the generator to assemble one clean record for your other senders, and keep it to a single line.
Sending sources
Search for each platform you send email through and tick it.
Search for your email platform above, or .
This domain's own servers
Authorize the domain itself, if it sends mail directly (not through a platform above).
Other senders & IPs
Anything not in the list — another provider's SPF host, or specific IP addresses.
We add the include: prefix — enter the hostname your provider documents.
Policy for everyone else
What receivers should do with mail from any server not listed above (the all mechanism).
No senders yet, so every message would hit the ~all policy. Add the platforms you send through in step 1.
- Publish it as a TXT record at your root domain — host @ (the bare domain), value the full string above.
- Keep only one SPF record per domain. Merge every sending source into this single line — a second TXT record starting v=spf1 makes both invalid.
- Stay at or under 10 DNS lookups. Each include:, a and mx counts, and an include can trigger more lookups inside itself — ip4: and ip6: are free.
Authentication published? The next step is sending to a clean, verified list.
Verify a listHubSpot SPF — FAQ
Related reading
Once it's published, confirm everything resolves with the domain health check, then read who's sending as you with the DMARC report analyzer. Browse all sending sources in the generator. Authentication is only half of deliverability, though — a listed sending IP or domain still lands you in spam no matter how clean your SPF is, so it's worth watching the blacklists with blacklist monitoring.
Authenticated — now keep the list clean
Passing SPF, DKIM, and DMARC gets you to the inbox; a clean list keeps you there. Verify yours — start free with 100 credits, no card required.