Blog, Website & Page Publishing


Can I set a custom root URL in my template files?



I would like to know if, technically speaking, is it possible to override my blog root URL (set in Settings > Website > Blog) to use a custom one of my choice?




I'm thinking of a variable that I would use everywhere in my blog template so that all the urls would use my new custom root URL.

Are we able to override all the urls using the blog templates or some are managed on HubSpot side and not editables?



I would like to move my blog from a subdomain to a subdirectory ( to while keeping my existing marketing website hosted somewhere else.

HubSpot support told my that this is not supported, I have to host the marketing website on HubSpot.

But using a proxy, I am able to "host" the blog on my subdirectory.

I just need to change all the urls of my blog to use the subdirectory structure and make redirects but here is where I'm stuck.

HubSpot doesn't let me choose a custom root URL...


Thanks in advance!

0 いいね!
ガイド役 | Diamond Partner
ガイド役 | Diamond Partner

Can I set a custom root URL in my template files?

Hi @LionelP ,

I understand you're looking to change your blog URL here- that might be possible by connecting your main domain for your Blog in your domain settings

After which, you can head over into your blog settings to add the slug 'blog' behind


First, we'll need to make sure that we have a domain connected for our blog. This can be done in the domain settings (see link & screenshot). 


Next, we'll need to head into our blog's settings (Settings > Website > Blog). From there, we can just add a blog slug, in your case, 'blog' and this would apply to all blog posts (see screenshot).





Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.

0 いいね!

Can I set a custom root URL in my template files?

Thanks for your reply @webdew!

But I don't want to connect my main domain to HubSpot because I don't want to host my main website on HubSpot.

I want to keep having my main website hosted somewhere else and add the blog in a subdirectory of my main website.

0 いいね!