There is a new domain connection process in HubSpot to better indicate the steps necessary when adding a domain to the HubSpot domains tool for use in a reverse proxy. I’ll include several screenshots in this post and also a follow up reply that shows steps in Route 53 (AWS DNS service). I’ve also added several steps and notes in this reply post that show many of the necessary AWS Cloudfront steps
- Connect a domain in HubSpot.
-
You likely want to pick the option to 'connect a secondary domain". Also, DESELECT the option for “Connect with HubSpot’s built-in content delivery network”
-
Add the domain that will be the LIVE domain for the content. This domain is likely already live with content. You are NOT updating your DNS to point your A record or CNAME at HubSpot.
Instead, in this step, you’re telling HubSpot the domain to expect traffic from, so HubSpot can provision an SSL Cert, verify you own the domain and add it into the system to know how to serve content for the traffic
.
-
No major changes needed on this screen, you can likely just click through
Note: my screenshots are showing a subdomain (rp.mulligandevelopment.io), you can also use a root domain (i.e. domain.com; or in my example mulligandevelopment.io) if that’s what you’ve connected in the previous step.
- No changes here, click on through
- This is the MOST IMPORTANT step: HubSpot provides you 2 DNS records. Go to your DNS provider and create 2 records: a TXT and a CNAME. These are used for domain validation and provisioning of a certificate. DO NOT SKIP THIS STEP! REPEAT: DO NOT SKIP THIS STEP
- In your DNS, add TXT and CNAME records. I’m using AWS Route 53 DNS. The values are provided to you by HubSpot in the previous step.
-
Verify the domain connection in HubSpot. (Don’t have a screenshot of this step, you can also leave this step). Depending on the state of your proxy, you may need to have a proxy behavior setup to route traffic to your domain. You may also want to skip this step and jump to steps 9 & 10
Note: it can take several minutes (and I believe up to a few hours) to have a certificate provisioned after you have added the DNS validation records. -
Navigate back to the HubSpot domains screen and click “Actions” for the domain that you just added. Choose to “Set as Ready for Publishing”.
The purpose of this step is to allow you to publish content in the HubSpot content tools even though the domain isn’t actually connected to HubSpot, but that WILL be the domain that your user is requesting content on (i.e. Your visitor navigates to domain.com/page, where domain.com is connected to your CDN. Your CDN proxies the request to an origin based on your behavioral rules. HubSpot finds a page on the exact domain and path as requested by the user. This is a non-intuitive step to many folks who are setting up proxies, which is why I’m going into this detail)
-
Now, to test, create and publish a web page in HubSpot CMS that uses the domain you just added to the domain manager (and validated but did not connect to HubSpot) (my post below shows this)
- For some use cases, (such as moving a blog from a HubSpot subdomain to your proxied domain, you may also need to update your HubSpot blog to be located on this new domain (do this with caution! I recommend testing with a test blog and a test subdirectory/subdomain first to ensure the connection works properly).
Contact HubSpot Support and ask about how to move a blog from one domain to another domain.
Note: Reverse proxy setups are not supported by HubSpot Support, but they should be able to provide some instructions for moving content from one domain to another domain)
- For some use cases, (such as moving a blog from a HubSpot subdomain to your proxied domain, you may also need to update your HubSpot blog to be located on this new domain (do this with caution! I recommend testing with a test blog and a test subdirectory/subdomain first to ensure the connection works properly).
-
In your CDN, update to include a new origin and behaviors as described in this documentation that points at the appropriate HubSpot CNAME. Remember that the domain of your CDN (that your visitor is navigating to) should be the EXACT same domain that you added to the HubSpot domains tool and that you also published content on in the HubSpot CMS







