APIs & Integrations

markdhansen
Participant

HTTPS Redirect To HubSpot - What is Best Practice?

DNS services cannot provide a 301 redirect for HTTPS. I'm migrating to HubSpot from a homegrown PHP environment hosted on Apache. What is the recommended best practice for redirecting the HTTPS links to my site?

TL;DR Details

I'm moving my company website to HubSpot COS. All our content is hosted on the root domain: https://foobar.com

So, now we are going to have to implement redirects like this that work the HTTPS.

foobar.com --> www.foobar.com
foobar.com/blog --> blog.foobar.com
foobar.com/support --> support.foobar.com

What's the suggested best practice to solve this? I'm thinking of an Amazon cloudflare / s3 / route 53 setup like described here: https://stackoverflow.com/questions/24871111/amazon-s3-static-website-redirect-https-to-http/2487636...

But, I'd like to know what HubSpot recommends? What's best practice? What has worked for others?

9 Replies 9
krisbob
Member

HTTPS Redirect To HubSpot - What is Best Practice?

Hi @markdhansen . It's true that DNS services cannot provide a 301 redirect for HTTPS. To redirect your HTTPS links to your site while migrating to HubSpot COS, there are a few options:

  1. Use a reverse proxy: You can use a reverse proxy, such as Nginx or Apache, to redirect HTTPS traffic to the new site. This option requires technical knowledge and may not be the best choice for non-technical users.

  2. Use a third-party service: You can use a third-party service, such as Cloudflare, to handle the redirects for you. This option is easy to implement and may be a good choice for non-technical users.

  3. Use RedirHub , that is a great solution for redirecting HTTPS links to your site. You can set up forwarding with masking or 301 to redirect your HTTPS links to the new site. This option is easy to implement and provides a seamless transition for your users. by the way, it has a free plan to use.

 

0 Upvotes
bkirschner1
HubSpot Product Team
HubSpot Product Team

HTTPS Redirect To HubSpot - What is Best Practice?

Hey @khookguy, this is how I advise customers with this question.

Having the secure apex domain redirect to the subdomain hosted on HubSpot most of the time is not necessary. Visitors seldom type "https://" before visiting a page. The main reason you would want this is if you hosted content under the secure apex domain (https://foobar.com) before migrating your website to HubSpot; your pages may still be indexed by Google under the secure apex domain. To confirm if this is the case, you can enter site:foobar.com into Google to search for only pages under that domain.

If this type of redirect is necessary, then a solution would need to implemented outside of HubSpot. This is a sophisticated DNS change, which is outside of the scope of what we can support, but we are happy to offer recommendations to point you in the right direction. Below are some options to consider:

  • Using a third-party service, such as EasyRedir, that provides this functionality and has support to help every step of the way.
  • Find a DNS provider that supports this functionality. Most DNS providers do not have this functionality, but Cloudlare is one that does.
  • Purchase a server, install an SSL certificate on that server, and configure that server to forward traffic from the secure apex domain.

I hope this helps!

0 Upvotes
markdhansen
Participant

HTTPS Redirect To HubSpot - What is Best Practice?

Hi Brandon,

Thanks for your advice. In particular, thanks for confirming that this is non-trivial and describing some of the options.

IMHO the following is not good advice to your customers to have been using HTTPS apex domain as their standard URL. These days, this is pretty common. So, I would think that HubSpot would want to publish some content / case studies about how people handle it. For us, we have 100s of links to https://foobar.com - with big SEO value, and these links send us lots of leads.

Again, thanks for the help. I just discussed this with our technical team. Since we use a load balancer, they think we will be able to use that to redirect both HTTP and HTTPS to www.foobar.com.

0 Upvotes
bkirschner1
HubSpot Product Team
HubSpot Product Team

HTTPS Redirect To HubSpot - What is Best Practice?

Glad to help! My response was more of a framework for answering this question, but you're correct when the website is hosted under the secure apex before migrating then it's absolutely necessary to set it up for redirection to preserve SEO and ensure previous links do not break.

0 Upvotes
markdhansen
Participant

HTTPS Redirect To HubSpot - What is Best Practice?

FYI, we just helped another firm with this same problem. In case anyone else is reading this, our solution (for them) was this:

(1) DNS points root (foobar.com) to Amazon CloudFront which can host the SSL cert and handle HTTPS
(2) CloudFront has origin set to Amazon S3 folder (rarekarma.com.s3-website....)
(3) S3 is setup for a 301 redirect to www.foobar.com

This setup seems to be working fine for them.

If anyone is interested in talking to me about the details, message me on @khookguy or send an email to mark@rarekarma.com

Mark

cbarley
HubSpot Alumni
HubSpot Alumni

HTTPS Redirect To HubSpot - What is Best Practice?

Hi @khookguy, looks like you got help from @boulter on this thread: Why Can't CMS (COS) Pages Be Hosted On Root Domain?. To confirm, you should be able to contact Support or your CSM in order to be ungated for Apex redirects.

0 Upvotes
markdhansen
Participant

HTTPS Redirect To HubSpot - What is Best Practice?

Hi Connor. Thanks, but Apex redirects don't solve the problem I'm asking about here. HTTPS cannot be redirected by the DNS provider. So, I'm asking what people usually do in order to redirect https://foobar.com to https://www.foobar.com

0 Upvotes
boulter
HubSpot Product Team
HubSpot Product Team

HTTPS Redirect To HubSpot - What is Best Practice?

Your DNS service provider can probably do this for you.

0 Upvotes
markdhansen
Participant

HTTPS Redirect To HubSpot - What is Best Practice?

A DNS service cannot redirect HTTPS traffic. They cannot host the necessary SSL certificate. Its a technical limitation. My DNS service cannot advise me on how to do this because they don't know how. They told me to ask HubSpot.

There are a variety of work-arounds described out there on the web. I'm asking for HubSpot's recommendation on the best solution.

Surely somebody on your technical team has dealt with this issue? It must come up whenever a company migrates an existing site to HubSpot.

Mark