HubSpot DMARC Alignment Configuration
If you're using HubSpot to send marketing emails, transactional notifications, or sales outreach, and you're also serious about email deliverability and security, you've likely encountered DMARC. DMARC (Domain-based Message Authentication, Reporting, and Conformance) is crucial for protecting your brand from spoofing and ensuring your legitimate emails reach inboxes. However, simply having a DMARC record isn't enough; your sending services, like HubSpot, need to align correctly with your DMARC policy.
This article will break down what DMARC alignment means in plain English, specifically for HubSpot users. We'll explain why alignment failures happen and, more importantly, tell you exactly what you need to configure in HubSpot and your DNS to fix them.
Understanding DMARC Alignment
Before diving into HubSpot specifics, let's quickly recap DMARC and alignment.
DMARC builds upon two foundational email authentication protocols: SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail).
- SPF verifies that an email originates from an IP address authorized by the domain owner. It checks the
Return-Path(orMail From) domain. - DKIM uses cryptographic signatures to verify that an email hasn't been tampered with in transit and was sent by an authorized sender. It checks the
d=tag in theDKIM-Signatureheader.
DMARC Alignment is the critical step. For an email to pass DMARC, at least one of these checks (SPF or DKIM) must not only pass, but also align with the From header domain (the domain your recipients see).
- SPF Alignment: The
Return-Pathdomain must match or be a subdomain of theFromheader domain. - DKIM Alignment: The
d=tag domain in theDKIM-Signaturemust match or be a subdomain of theFromheader domain.
Alignment can be either relaxed (r) or strict (s).
* Relaxed alignment allows the domains to be subdomains of each other (e.g., bounce.yourdomain.com aligns with yourdomain.com). This is typically sufficient and often the default for many services.
* Strict alignment requires an exact match (e.g., yourdomain.com must align with yourdomain.com).
If neither SPF nor DKIM aligns and passes, the email fails DMARC, and your DMARC policy (e.g., p=quarantine or p=reject) will be applied.
HubSpot's Role in Email Sending
When you send an email through HubSpot, HubSpot's servers are the ones physically sending the email. By default, HubSpot sends emails on your behalf, but it uses its own infrastructure. This is where alignment issues arise if not configured correctly.
Consider a typical email sent by HubSpot without custom configuration:
- The
Fromheader will beyou@yourdomain.com. - The
Return-Pathheader will likely be something likebounce-somehash@sends.hubspot.com. - The
DKIM-Signatureheader'sd=tag will often behubspotemail.netor a similar HubSpot-owned domain.
Notice the mismatch? sends.hubspot.com and hubspotemail.net do not align with yourdomain.com. This will cause DMARC failures.
Fixing SPF Alignment with HubSpot
For SPF alignment, the Return-Path domain needs to align with your From header domain. By default, HubSpot uses sends.hubspot.com for the Return-Path, which won't align with yourdomain.com.
The solution is to configure a custom sending domain in HubSpot. This process involves adding a CNAME record to your DNS that points a subdomain of your choice (e.g., hs.yourdomain.com or mail.yourdomain.com) to HubSpot's infrastructure.
Here's how it works:
- HubSpot Configuration: In HubSpot, navigate to Website > Domains & URLs > Email Sending. You'll be prompted to add your domain and configure it.
-
CNAME for Return-Path: HubSpot will provide a CNAME record. This record will typically look something like this:
TYPE: CNAME HOST: hs1234567._spf.yourdomain.com (or a similar HubSpot-generated subdomain) VALUE: 1234567.spf.hubspotemail.netImportant Note: This CNAME record is not for the
Return-Pathitself. Instead, HubSpot uses this CNAME to verify domain ownership. Once verified, HubSpot will automatically rewrite theReturn-Pathfor emails sent fromyou@yourdomain.comto use a subdomain likehs-abcdef.yourdomain.comorhs-bounce.yourdomain.com. -
SPF Record for your Custom Sending Subdomain: If HubSpot is rewriting the
Return-Pathtohs-bounce.yourdomain.com, then the SPF record forhs-bounce.yourdomain.comneeds to authorize HubSpot. You'll typically add an SPF record to this specific subdomain:TYPE: TXT HOST: hs-bounce.yourdomain.com VALUE: v=spf1 include:spf.hubspot.com ~all(Note: The~allis a softfail, often preferred initially. You can tighten to-alllater if confident.)By doing this, the
Return-Pathdomain (hs-bounce.yourdomain.com) now aligns with yourFromheader domain (yourdomain.com) under relaxed SPF alignment.
Fixing DKIM Alignment with HubSpot
For DKIM alignment, the d= tag in the DKIM-Signature needs to align with your From header domain. By default, HubSpot signs with its own domain (e.g., d=hubspotemail.net).
The solution is to configure custom DKIM signing in HubSpot. This involves adding two CNAME records to your DNS, allowing HubSpot to sign emails on behalf of your domain.
- HubSpot Configuration: In the same Email Sending settings within HubSpot, you'll find instructions for connecting your domain for DKIM.
-
CNAME Records for DKIM: HubSpot will provide two CNAME records. These records delegate authority for specific DKIM selectors to HubSpot's signing infrastructure. They usually look like this:
``` TYPE: CNAME HOST: hs1-############.yourdomain.com VALUE: hs1-############.dkim.hubspot.com
TYPE: CNAME