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.
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.
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 .
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.
Hi, firstly thank you @liranco for the great write up. I’ve setup my domain as recommended. I’m facing some issues with 301 redirects however. I believe these come from Webflow. Here is what I observe:
I have a project with wf.smplrspace.dev as the only added custom domain. It’s not set as default. I am using a proxy (cloudflare worker) running at www.smplrspace.dev, which forwards the request to wf.smplrspace.dev and responds to the user on behalf. However Webflow seems to be responding to the proxied requests with a 301 redirect to wf.smplrspace.dev.
We have recently published a guide on our blog that explains the process of hosting your WordPress blog on a subdirectory using Cloudflare workers + Webflow - so you might find it helpful.
Check it out here: https://shapo.io/blog/wordpress-blog-on-a-subdirectory-with-cloudflare/