Hello! I know this question has been asked before but I can’t find a definitive answer and neither can our developer. They don’t have a lot of experience with HubSpot so are nervous of the impact of implementing your reverse proxy. I won’t use our real domains.
Our main website is https://domain.com/
Our blog is hosted with HubSpot at https://blog.domain.com/
We want our blog to be proxied to https://domain.com/blog
In HubSpot, we have the following primary domains…
Website pages: domain.com (connected via reverse proxy)
Blog: blog.domain.com (connected)
Landing pages: pages.domain.com (connected)
Email: pages.domain.com (connected)
Knowledgebase: help.domain.com (connected)
Customer Portal: help.domain.com (connected)
We have no secondary domains or restricted domains.
Can someone please give me some easy steps to make this work? I’ve read the documentation and it’s not making sense to me. I realise this is hard to implement but we need to do it internally for budget reasons.
Thanks
Hey there, curious if you figured this out. We are in the same spot.
Here are some steps to get you started:
Configure NGINX or your preferred web server to act as a reverse proxy.
Create a new server block (virtual host) for your blog.
In the server block, use the “location” directive to specify that requests to “/blog” should be proxied to “https://blog.domain.com/”.
Here’s a basic NGINX example:
server {
listen 443 ssl;
server_name domain.com;
ssl_certificate /path/to/your/ssl.crt;
ssl_certificate_key /path/to/your/ssl.key;
location /blog {
proxy_pass https://blog.domain.com/;
}
# Other server configurations…
}
If you ever need to troubleshoot or explore more proxy-related topics, you can also check out resources like YouTube Proxy for additional insights.
I hope this helps!
Ensure reverse proxy is enabled in HubSpot (sounds like it is for domain.com).
Set blog primary domain to domain.com in HubSpot:
Go to Settings → Website → Domains & URLs.
Edit the blog domain → change it to domain.com → set path as /blog.
Configure your reverse proxy (e.g., NGINX or Apache) to forward /blog to https://blog.domain.com.
Example (NGINX):
location /blog/ {
proxy_pass https://blog.domain.com/;
proxy_set_header Host blog.domain.com;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Test for broken links and assets.
Are you by chance using WordPress? Did you try using the plugin to do this, but the above method worked better? Thanks so much - we are trying this now and learned the reverse proxy is in beta… but if you were doing this 2 years ago, wondering if it’s been in beta that long??
Hi @KCleary17,
Thank you for posting to the Community!
Tagging in some Top Contributors into this thread to see if they have any ideas on this one, since this thread is from a few years ago -- Hi @Indra @GeorgeBThomas and @Phil_Vallender Have any of you all had any success setting up a reverse proxy for a blog using the Wordpress plugin? Do you have any advice for @KCleary17?
Thank you!
Cassie, Community Manager
Thank you @chighsmith
Hi @Indra @GeorgeBThomas and @Phil_Vallender Would love to know how you got around some of the reverse proxy issues we are encountering. We think we have overcome tracking issues, but now that the pages are in place, we have them in place as a clone rather than a lift and shift. This has caused the Hubspot chat not to run on the new reverse proxy pages on our root domain, but only on the subdomain. Any thoughts here from anyone on why this is happening and whether we did the reverse proxy in the optimal way, since we still have two versions of each page (one on the subdomain, one on the new directory on our root domain).
Hi there,
I am also trying to use the WordPress plug-in to enable the reverse proxy and am encountering some issues. Wondering if there was any follow up for KCleary17 above that could help? @Indra @GeorgeBThomas and @Phil_Vallender
Hey there @DSchindler thank you for adding your comment to this thread!
I wanted to share a few resources that help clarify where things stand today with this issue
For context, this Community thread explains the current limitation:
https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Unable-to-connect-my-blog-to-domain-subdirectory/m-p/1070961
This Community thread confirms a workaround:
https://community.hubspot.com/t5/CMS-Development/Hosting-HubSpot-blogs-in-a-subdirectory-of-an-external-root/m-p/297029
Finally, I’m tagging a few community experts who may be able to share additional insights or real-world experience here — hey there @Phil_Vallender @GeorgeBThomas @Ben_M , hope you’re having a great week! Any guidance you’d like to add?
Thanks!
Victor
Thanks Victor, the link to the workaround isn’t working - could you include the whole thread URL?
Hey @DSchindler The links are working now!
Best
Victor