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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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?
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.
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 , but there are actually some pretty cool solutions available:
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.
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
The article includes step-by-step instructions ( 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!