Hosting two Webflow sites on the same domain with the second site in a subfolder

Has anyone hosted two Webflow sites on the same domain with the second site in a subfolder? I want to utilize two different themes (example one company theme and blog publication theme).

www.example.com → Webflow Site 1
www.example.com/blog → Webflow Site 2

The easy route would be to point the second site to a subdomain like blog.example.com, but I prefer subfolder. It appears Webflow has a href-prefix feature that works if Site 1 is hosted elsewhere and using reverse proxy in the .htaccess settings. But in this case Site 1 is also Webflow, and my understanding is we can’t change .htaccess settings in Webflow. I also looked into DNS settings, and again the issue is DNS cannot direct to a subfolder.

Any help appreciated :pray:

1 Like

Okay, I figured it out. Using the same solution for reverse proxy, I just created two rules. Therefore I pointed the domain DNS records to a server that has .htaccess, in our case, AWS EC2 instance. You should be able to use any server. The server is just an empty shell, since all traffic is being redirected.

In Webflow, for each site we connect a subdomain. And in .htaccess we point to these subdomains. Reverse proxy settings below.

ProxyRequests on
ProxyPass "/subfolder" "https://subdomain2.domain.com/"
ProxyPassReverse "/subfolder" "https://subdomain2.domain.com/"
ProxyPass "/" "https://subdomain1.domain.com/"
ProxyPassReverse "/" "https://subdomain1.domain.com/"
1 Like

Thank you Dennis. This is a massive help.

Do you only need to use the “empty shell” server for the subdomains. The root stays “as is” on Webflow? Sorry, I’m a little lost.

1 Like

Dennis, would this allow for:

www.example.com → Webflow Site 1
www.example.com/marketplace → Bubble website
www.example.com/blog → Blog?

I created a post on the Bubble forum where we want to do exactly this. Webflow for the SEO important pages, Bubble for the app, Ghost for the blog functionality.

If so I am insanely excited. Thank you.

Were you able to solve this Evan?

would this allow for:

www.example.com → Webflow Site 1
www.example.com/marketplace → Bubble website
www.example.com/blog → Blog?

Hello @tylervallely - Yes we did solve it. Check out:

We ended up seeking professional assistance, so I don’t have any real insights apart from… we used Nginx. We established subdomains for each with reverse proxy to subfolder arrangement.

Another interesting thing we discovered… you can’t use the auto sitemap generator through Webflow for this. It will point to the subdomain locations. Hope this helps.

1 Like

May I ask who you hired/could you please send me a DM? Looking to implement this on my website as well.

Thank you for the sitemap insight.

Hello @tylervallely - I’ve sent you a DM with more details.

1 Like

Hi @tylervallely just saw your note, and yes we were able to accomplish what you are looking to do hosting multiple sites using same top-level domain and redirecting to subfolders.

We pointed our main domain to an empty AWS EC2 with Apache web server. Then in Apache we set up redirecting for all sites based on the url and subfolder. You can redirect your TLD / www traffic also to a Webflow site. These can be multiple Webflow sites or can be a combination of Webflow, Bubble, Wordpress, etc. Pointing the top level domain to AWS EC2 will give you full control over routing traffic.

www.example.com -> AWS EC2 -> Webflow www1.example.com
www.example.com/blog -> AWS EC2 -> Webflow blog.example.com
www.example.com/marketplace -> AWS EC2 -> Bubble/Wordpress/etc marketplace.example.com

In the example above, by using AWS EC2 the public and search engines will only see the subfolders and not the subdomains. You will need to make sure to set up canonical tags and site maps correctly.

I’m not expert in Apache, but it should be easy. Here is some Apache documentation. A devops engineer should be able to assist.

https://httpd.apache.org/docs/2.4/rewrite/remapping.html

If you do go this route, note that any subfolder sites hosted on Webflow you won’t be able to use the automatic sitemap generator since Webflow will use the wrong urls.

4 Likes

Thank you! Very much appreciated.

Hi Evan,

Would you be able to share the information of the professional you worked with with me as well? I am having the same issue…

Thanks,
Ryan

I am working on getting a reverse dns proxy setup going myself with AWS, and I’m curious if anybody knows the difference between using EC2, and using CloudFront + Lambda@Edge. I’m seeing multiple guides online where people recommend one or the other.

Hey Evan! Would love a referral to whoever you used to implement this. Have tried a lot of things unsuccessfully and am looking for help.

Hi evan! Would you be able to share the information of the professional you worked with with me as well? Thanks!

Hi everyone. My apologies for the late response. For those requesting details on who I used to set up our reverse proxy - I cannot recommend this person anymore. Our reverse proxy arrangement is still working (and very well), but I referred another to my contact and the service he provided was substandard. I couldn’t in good conscience recommend this person.

Brainstorming and searching for days.

Nice to find a confirmation that this setup works!

As it is hard to have two hosted webflow sites available for testing, Webflow’s docs should tell more: Href prefix | Webflow University

Hey guys. I’m looking for the similar setup.
I have:
mydomain.com → webflow

I need:
mydaomin.com/customPath/* → myApp
mydomain.com/* → myproxy → webflow

I can setup the DNS of mydomain.com pointing to my proxy.
But, what should I setup in webflow?
Also, where should my proxy forward the traffic to? proxy-ssl.webflow.com?

Thank you for your help.