Hi all, I’m trying to point to a WeWeb app from a different domain (in the future from multiple different domains) than the one it’s hosted on. Looking to create one single app to process the booking forms for multiple venue booking websites.
The idea is that when the user is on a listing page, lets say listing X, the url would be “/listing/x”. When they would proceed to the booking form we would append “booking” to the url, resulting in “/listing/x/booking”. The first url should point to the listing page, hosted on Webflow, and the second url should point to the booking form hosted on WeWeb.
I’ve achieved this before using a reverse proxy thru Cloudflare linking two different Webflow projects together, but when I tried to re-use the script, it didn’t seem to work with WeWeb. All I got was an empty page called “weweb-front” and some error messages in the console.
Does anyone know if this is even possible with WeWeb? I’ve read some things about hosting the WeWeb app myself, but I have no experience in this, so I’m really hoping there is a way using WeWeb’s own hosting.
WeWeb apps are designed to be complete standalone applications that run on their own subdomains, not parts that can be embedded into other websites. Both WebFlow and WeWeb would need its domains. If using the WeWeb app inside an iframe is not enough, I’d recommend self-hosting since then you can set up any domain structure you want. Self-hosting on Cloudflare is super simple; here is an article I wrote on how to do it: How to self-host on Cloudflare | WeWeb Documentation
Just tried self hosting and I got set up within five minutes using the Github integration and Cloudflare pages, which was a breeze. Thanks for the detailed article! Sadly the reverse proxy didn’t work since the WeWeb project was trying to fetch all sorts of resources from the root domain, which was the Webflow site. Seeing how easy self-hosting is we’re now considering rebuilding our sites in WeWeb and using prerender.io for our SEO pages. Just wanted to thank you for the article.
Hey @thijshofs, how did you do this? If you self host with Cloudflare, how do you set up the domain so that domain 1 goes to page 1 and domain 2 goes to page 2 of your Weweb project? Hope this makes sense ><
Hi @raelyn, I ended up just pointing to the WeWeb domain without a proxy. We are hosting on Cloudflare pages, using the Github integration, which is pretty straightforward. The problem is that (in our case) the WeWeb app tried to fetch a bunch of files from the root domain, but the root domain was changed by the reverse proxy, so the files weren’t there and the app wouldn’t load.
Cloudflare pages is pretty cheap, you can find their pricing here, but when your app is on Github you can really use any hosting provider, like Vercel or Netlify as well.
If you end up solving this I’d love to hear how you did it for your use case!