A challenge of previously working with the HubSpot CMS was that you were unable to easily redirect your core or top-level domain (i.e. https://domain.com) to your subdomain (i,e. https:www.domain.com). You were also unable to host content on that core domain. With the advent of root / apex domain availability in HubSpot, which is a big deal and something we've been waiting for as an agency, a redirect without a third-party utility is now possible and available directly in the HubSpot CMS.
Redirecting Your Core Domain
If you already have your website set up on HubSpot through your subdomain, your best bet is to redirect your core domain to it. Most companies we see using the HubSpot CMS \ haven't been leveraging a workaround for this, so their core domain is dead on the vine and they don't even know it, which causes your search engine optimization (SEO) , search engine rankings, and likely your domain authority to take a hit.
Go to your DNS Manager
The most popular hosting site is GoDaddy. However, most DNS's will be setup in a similar fashion. You'll want this open as we go through the other steps. Then go to settings.
Go to HubSpot Settings
Once in settings, you will want to navigate to "Domains & URLs" on the left sidebar. This should automatically bring you to the "Domains" tab. From there you will want to click on "Connect a domain".
You will then select to connect a redirect domain.
Select a domain to connect to (should be without a subdomain aka www.)
Then select the domain you will be redirecting to (should be your www.)
You will then have the chance to verify that the domains you selected are correct.
You will then be brought to a screen with the steps to get into your DNS manager. Since we are already logged in, you can immediately check steps 1-3.
We are now presented with 2 different A records.
Back to the DNS Manager
There should be an A record that exists already. That can just be edited. If the A record is not editable, then that means it is managed somewhere else. You will want to delete where it is managed. You will have to also add an A name record.
Type will be A, Host will be @, TTL will be custom with 600 seconds. The Points to will be the IP address from the last step in HubSpot.
Do this for both IP addresses that HubSpot provided.
Go to whatsmydns.net
We can now go to whatsmydns.net to check the propagation progress. Here you will want to search the core domain (domain.com without www. subdomain). Make sure that you are checking the A record as well.
You should start to see a few location propagate. Not all locations will propagate at once, but as long as you notice some are beginning to, that is a good sign.
It may take up to 24 hours for all locations to propagate.
Back in HubSpot
The new domain may not verify immediately. It should take anywhere from 1 minute up to an hour. Anything longer than 1 hour, we would recommend calling HubSpot support. Once verified, though, you will have the following message:
You will also begin to see that your SSL is now processing. As the message states, this can take up to 4 hours. It usually does not take that long.
While the SSL is processing, we can adjust some additional security features. For website domain, click on the Edit dropdown and select "Update domain security settings".
Within here, we can navigate to the "Security headers tab". We then want to check HTTP Strict Transport Security (HSTS), Enable Preload, and Include Subdomains. We also want to set the duration for 6 weeks.
NOTE: Set the duration for 6 weeks initially, then in a month come back and change the duration to 6 months. Then in another month come back and change the duration to 1 year. Then in another month come back and change the duration to 2 years. This is done like this because of SEO implications.
Test in a web browser
The last step is to test if the core domain is now redirecting to the secure version of the domain, with the subdomain being www. Test both http://domain.com & https://domain.com to and make sure that these both go to https://www.domain.com. They may not redirect immediately, and you may get error messages like the one below:
This is fine, so long as it is temporary. HubSpot will give you an update when the SSL processing is complete, which looks like this:
If an hour has passed and the site is not redirecting, we would advise a call to HubSpot support.