# Proxy forwarding sub-domain to sub-directory

**URL:** <https://community.hubspot.com/t/proxy-forwarding-sub-domain-to-sub-directory/12599>\
**Category:** APIs & Integrations\
**Created:** [January 23, 2019, 10:26am UTC](https://community.hubspot.com/t/proxy-forwarding-sub-domain-to-sub-directory/12599 "2019-01-23T10:26:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [January 23, 2019, 10:26am UTC](https://community.hubspot.com/t/proxy-forwarding-sub-domain-to-sub-directory/12599/1 "2019-01-23T10:26:52Z")

</div>

Hi,

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](https://integrate.hubspot.com/t/proxying-to-hubspot-web-pages-landing-pages-etc/2810), 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?

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [January 25, 2019, 6:54pm UTC](https://community.hubspot.com/t/proxy-forwarding-sub-domain-to-sub-directory/12599/2 "2019-01-25T18:54:40Z")

</div>

Welcome, [@chripede](https://community.hubspot.com/u/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 `blog.domain.com` and your knowledge base on `knowledge.domain.com` 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](https://help.hubspot.com/).

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [January 28, 2019, 8:47am UTC](https://community.hubspot.com/t/proxy-forwarding-sub-domain-to-sub-directory/12599/3 "2019-01-28T08:47:46Z")

</div>

[@Isaac\_Takushi](https://community.hubspot.com/u/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?

---

<div class="post-metadata">

**Author:** ![brand-idea](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/brand-idea/32/14727_2.png) [@brand-idea](https://community.hubspot.com/u/brand-idea)\
**Post date:** [May 20, 2019, 2:44pm UTC](https://community.hubspot.com/t/proxy-forwarding-sub-domain-to-sub-directory/12599/4 "2019-05-20T14:44:58Z")

</div>

Hi there,

If the preference is to create a page with a front-facing link that reads “Get Support” and not just “Support”. Resulting in [www.brand-idea.com/get-support](http://www.brand-idea.com/get-support).

What if my original link was “/support” resulting in [brand-idea.com/support](http://brand-idea.com/support). How can I add a page resulting in a “/support” directory, but have a link label of Get Support? To keep my original link intact for backlinks and printed literature?

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [January 28, 2019, 2:57pm UTC](https://community.hubspot.com/t/proxy-forwarding-sub-domain-to-sub-directory/12599/5 "2019-01-28T14:57:11Z")

</div>

Hey, [@chripede](https://community.hubspot.com/u/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.
