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.

I created an account to tell everyone what I think is a such simpler way to do this.

If you want the following behavior:

You can do the following:

  • Create a new Cloudfront distro, set it to point to your s3 hosted static website
  • Add a new custom origin that points to the webflow website (something.webflow.io)
  • PAUSE: Now you should have a new cloudfront distro, with two origins (the other origin is auto created and can’t be changes for “*”, which you do want still).
  • Now, go create a new behavior for the path “/”, just a single slash. The behavior should be to route any paths to “/” behavior to the webflow custom origin you just added

That’s really it! You may need to configure custom certificates/other things like that. ALSO this will not step on your existing website. You can test Cloudfront in isolation, it’s okay to have multiple cloudfront distros pointing to the same thing, it doesn’t matter.

Release:

For us, we use AWS for everything. So release is updating the existing Route 53 alias record to point to the new cloudfront distrubtion. It will take a little time for all the DNS records to propogate around the world.

Parting thoughts:

This will not solve all use cases. Tylervallely is right above on everything they say, especially if you are going to have a very complex setup where you want to setup a ton of different URLs to a plethora or resources. You may at that point want to take their advice to setup a proxy server with apache or w.e. in EC2 (as he teaches above) to get deep control on this. But that being said, I think even for some cases like that the approach I post here can work well enough. If your webflow website has multiple urls/pages you will likely need to just add more custom Behaviors to the cloudfront distribution with origin paths specified to have override rules to send to specific webflow pages instead your s3 app by default path.

Hope this helps!

Hey Dennis :wave:t2:!

Great question about hosting multiple Webflow sites on the same domain. You’re right that it’s sadly not possible with Webflow’s default domain options.

The first time I did it take me quite a few hours to find the best approach :sweat_smile:, but there are actually some pretty cool solutions available:

  1. :cloud: Cloudflare Workers: This is a powerful and flexible option. You can set up a Worker to act as a reverse proxy, directing traffic to different Webflow projects based on the URL path. It’s free for up to 100,000 requests per day, which is plenty for most sites.

  2. :large_blue_circle: Subfold: This is a dedicated service for exactly this purpose. It’s super easy to use but does come with a monthly cost. Personally I would go with Cloudflare Workers instead, unless you are not very technical.

Both of these methods allow you to achieve what you’re looking for:

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

We’ve actually written a detailed guide on how to set this up using both methods: Step-by-step guide to having multiple Webflow projects on the same domain | BRIX Agency

The article includes step-by-step instructions (:desktop_computer: with screenshots) and a script for the Cloudflare Workers method, which based on your use case, probably you can just copy / paste and use as is, as it matches the type of subfolder reverse-proxy you are looking for accomplish.

Let me know if you have any questions about either method. Happy to help you get it set up! :rocket: