Streaming live at 10am (PST)

How to have a WP blog show as a subdirectory on Webflow

Hi there,

My current situation is:

domain.com (the main site) is hosted on Webflow. Main reason is because Webflow is design friendly for our designers

We want to create a blog (subfolder) domain.com/blog. However, we want our blog to be hosted on WordPress since it is friendly for our editors who maintain the blog content.

Is it possible and what is the best way to implement this? I have been trying to research about this but the only thread I found was 3 years ago How to add Subfolder - http://www.domain.com/blog with no solution. Just hope things have changed that allow us to have the main site hosted on WF and a subfolder being hosted on WP.

Looking forward to your help

Cheers

You would need to use a subdomain, like blog.domain.com. You can redirect /blog to blog.subdomain.com but you won’t be able to serve the wordpress site from a subdirectory since it cannot be hosted on webflow.

Thanks for your answer @webdev I was advised that we can interfere with the CDN setup. The logic is

At the domain level (domain.com) (on Webflow), we create 2 subdomains so that the BLOG can be hosted on WP . These 2 subdomains are meant not for Users to see.

(1): webflow.domain.com : served as a mirror site of the domain.com
(2): blog.domain.com: served as a blog that is hosted on WordPress

Then we set some rules for the above 2 subdomains : This is what users see

(1) webflow.domain.com: What users see will be domain.com
(2) blog.domain.com: what users see will be domain.com/blog

Seems like an OKAY solution. However, one problem arises is the mirror site of the main site webflow.domain.com is indexed on Google, which we dont want. We tried to control that by setting up disallow on robots.txt file. However, whatever changes we make on the mirror site would affect directly the main site domain.com

Wondering whether there is some tips to hack around this .

Cheers

I think the only way around this would be to reverse proxy the whole site and then configure the the /blog to be a different resource. It may be possible with cloudflare, but you would not be able to use SSL on webflow, that would have to be enabled on CF only. Service workers could come into play. Normally I am in control of the hosting so no limitations.

You would have to probably build out a test to confirm.

@clareseos I remembered an article about using cloudflare’s service workers as a way to pull this off, just needed to find it. Here you go.

https://www.codiva.io/blog/post/host-saas-product-blog-in-subdirectory-instead-of-subdomain/

We did this over on our site and it’s been working great. While, you do have a mirrored domain, we haven’t had any issues with Google picking it up and indexing it. I wrote a guide on how to make this work using Cloudflare Workers: https://medium.com/@liran_co/how-to-use-webflow-to-host-parts-of-your-site-cloudflare-workers-f0f972503aef

1 Like

Thanks for sharing this good workup. This will save others a bunch of time that have a similar requirement.