Proxy forwarding sub-domain to sub-directory



We're in the process of moving things to HubSpot, but we would very much like to keep current URL structure intact. That means hosting the blog on domain/blog, the knowledge center on domain/help etc.

To do this I'm setting up proxy forwarding in nginx and rewriting the content to replace the internal HubSpot domain with our own. That works OK, except for a few things like clicking on search results will redirect you to internal URLs.

I found a few topics on here regarding the same thing Proxying to Hubspot web pages, landing pages, etc, and @dadams mentions that HubSpot might block the proxy server if it sends to many requests. However, the question about X-Forwarded-For is never answered.

Is there a smart and future proof way of doing this?


Welcome, @chripede.

Thanks for reaching out. The security team has confirmed that we do not support or plan to support using proxy servers to access HubSpot CDN-hosted content.

This includes using X-Forwarded-For headers. As David states in the other topic, your users may not experience issues with this immediately, but we cannot guarantee reliability under any circumstances.

That said, you can maintain your current URL structure (with different content hosted on different subdirectories) just as long as it's on a HubSpot-hosted subdomain (e.g. www.domain/blog instead of just domain/blog). Said differently, you don't have to host your blog on and your knowledge base on just because you are moving onto HubSpot. If you'd like to discuss these options in more detail, feel free to reach out to HubSpot support.


@Isaac_Takushi I actually contacted support and they sent me here.

If I understand correctly, your solution requires us to host everything with HubSpot, even our frontpage?


Hey, @chripede.

Thanks for letting me know. Support should be able to handle general queries like this. Could you share the ticket number so I can reach back out to the specialist?

I may have misunderstood your original request. I assumed that you wanted to replicate your external site's path structure on a HubSpot-hosted www subdomain.

Re-reading your post, I now think you may have been asking whether it is possible to place HubSpot CMS content on your externally-hosted www subdomain, alongside content published through your other CMS. This is not possible with a proxy server for the reasons I mention above.