[plugin] SaasAlias: Multiple domains and subdomains for bubble apps

OK, I’ve sent you a first private message. Let me check if I missed some information!

Hum ok, they are several info missing for support purpose. I can’t provide them right know as I’m not at home and I’m sending these messages from my mobile phone. I’ll send the whole required info later!

@gaimed… Forget my previouses messages! I was using the plugin using the “website home url” built in variable from bubble to build the subdomain url… ‘and in test, it’ s not correct as it contains the “version-test” path! Sorry :pray:t2:

And I’m also sorry because I have a last question (promised, it will be the last one).

The index page of my app is the “landing” page of my Saas platform, let’s consider : mysaasapp.com

Each client has its own page, let’s say mysaasapp.com/page/client_slug (where client_slug is the slug for the client data type).

Thanks to your SaasAlias plugin, I’m able to “map”’ client_slug.mysaasapp.com to mysaasapp.com, and it’s very fast, great !

But how can I map “client_slug.mysaasapp.com” with “mysaasapp.com/page/client_slug” , without using a redirect so that the URL will remain client_slug.mysaasapp.com but the contents will be the one of the mysaasapp.com/page/client_slug page ? Is it possible ?

If it’s not possible, I’m not really sure how to host both the landing page (+ all workflows including subscriptions and the clients’ dashboard) and the “clients page” (or clients subdomain) in the same app…

Many thanks for your help or advice @gaimed :pray:

Check this reply. Same question [plugin] SaasAlias: Multiple domains and subdomains for bubble apps - #31 by gaimed

Yes but it’s not an answer…

You can also use the saasalias element. It has two porperties. It gives you back the subdomain. You can use that subdomain to get the relevant client and clients will only see client1.mydomain.com.

What does it mean? Using the saasalias element I will get “client_slug” so what, that means that to be ab’e to be a SaaS a bubble app needs to share the index page for both the landing page and the customer contents?

1 Like

No. You add a redirect with only the page filed in. Like client (that would be your page name). On that page you would use the saasalias element to get the data for the correct client for the page (you wont be able to use pages thing).

Many thanks for your feedback @gaimed, appreciated.

My use case was the following : “free” subscribers get an URL such as mysaasapp.com/page/client, and paying customers get a “client.mysaasapp.com” or their own custom domain. So I understand it’s not possible, because for free subscribers, I do need the page thing to display their contents.

The only way to work around this problem for this use case would be to duplicate the client “page”, one with a page thing (“client”), another without page thing but getting the client info from the (sub)domain. I will test this setup, even if not the most efficient.

Do you know why we can’t use page thing ? I was thinking the slug was “just” the final part of the URL, so I’m wrong. But I don’t see the difference between typing an URL with a slug and using the redirect path with a (text) slug…

OK well, the client page is became the new index page and it works well. The old index page has been renamed as “go” and “mysaasapp.com” url redirects to “mysaasapp.com/go”. Probably not the best way to do but it works, I’ll see how to do better.

:+1:t2:

Hi @gaimed , just copying in a question from elsewhere as requested:

Hey @mihira,

Your app will remain a platform as a whole, hosting all your clients, and all their users. So if a user signed up to your app, his credentials will be global for all of your clients stores, one login and one password for all. So they will or could be able to see all stores.

I’m in the same situation than yours. The main issue I see is around Stripe, the return url can’t be set dynamically so will be based on your / our main url, but using cookies or any other tricks, we can redirect the users to the appropriate shopping cart / shopping area (in case your clients sell online, of course!)

It’s not a “problem” with Saasalias, which works really great. It’s a problem due to the fact that there’s only one database a’d dmUser datatype in a single Bubble app, and user authentication is managed globally - at least for their credentials.

1 Like

Thanks @Christophe_HK for the response. When you say:

You mean for a brief moment the user will land on the bubble apps url and then have to be redirected to the sellers custom domain?

Yes… It may be fast using a redirect page, aka an empty page with a workflow for redirection.
To be implemented, on my side.

1 Like

Its possible. You will need to solve the free paid work within bubble.

Hello @gaimed,

My Google domain has been successfully migrated to Cloudflare! Perfect and fast!

Nevertheless, I experience an issue with the SSL plugin (the Cloudflare token has been generated) :

Is there anything I can do to try to resolve this timeout issue?

Many thanks! Your plugin is awesome, I’ll give a reco!

Weird, now an other error message…

Hello @gaimed,

For some reasons I ignore, the subdomain creation does no more work in the sense where the subdomain is created successfully (as per the log and no error), but any request to the subdomain leads to a blank page. It was working yesterday for some times, no more today. Weird…

I think this issue happened since I deploy the enw dev version of the app in production (live mode).

So, I have a question regarding the “Set version” feature of the plugin : what is the test version, what is the live version? In the Bubble dev environment, do we need to deploy the test version of the config (and respectively the live version in live mode)?

Another and last point I’d like to clarify : my bubble app was already associated to a custom domain, registered from Google Domains. In order to use the instant SSL plugin I subscribed, I’ve migrated the custom domain to Cloudflare and the migration is not completed and the setup is correct, as per Cloudflare dashboard (all Saasalias requirements are correct, including the wildcard mapped to the Saasalias IP).

But in such a scenario, do I need to create and deploy a config for my custom domain already mapped to my bubble app? And if yes, do I need to uncheck the “redirect” checkbox in the app settings? (in the plugin documentation, it is mentionned to uncheck this box if the app does not already use a custom domain).

I think I’m close to get the Saasalias perfectly working, and that’s will be huge! Many thanks again for this powerful plugin, and for the clarifications you will bring to me to get it working. I guess these clarifications will also be a great help / documentation for any future subscriber of your plugin!

Thanks :pray:t2:

Edit 2021-04-18 :

IMPORTANT INFO TO ALL PLUGIN USERS :

Take note that when using the SaasAilas plugin, you can’t protect your app using a login and password anymore.

Edit 2021-04-20 :

@gaimed : “half good news”, I succeeded in getting the let’s encrypt SSL cert generated and pushed to Cloudflare. See below the notification email sent by Cloudflare. The problem is that as long as my app doesn’t receive back to SSL cert, I can’t use it for my subdomains. Could you please have a look at the reason of the error, I guess it’s a bug…

Email from Cloudflare : SSL cert

SSL wildcard action failing (so no way to use the SSL cert / store it in the DB) :

Many thanks in advance! I really do need the instant SSL cert feature in my app :pray:t2:

Ill look into it. Need a bit more info. Please see your dm.

Yep, replied!

Hello @gaimed !

I wonder if this could be a solution for us. We are a platform integrating different brands and we would like that each brand has its own domain. Is if possible? And if so, how would be the estructure of the pages names? What I mean is: If our main domain is lxdglobal.com and we want to connect linknetwork.com does the url for the home and profile pages of the linknetwork.com would be soemthing like; linknetwork.com/profile/username ??
I hope I was clear enough. Thanks in advance for your reply!

1 Like

Hey @juan.roberto.garzon,

I’m going to answer, as it seems we have a real problem of responsiveness and support from the plugin author. This plugin could be huge and could even be one of the best plugin for bubble, but without any confidence that we can use it for our product, it would be difficult.

So yes, you can have your master domain, and each of your clients can have his own subdomain, or custom domain - what seems to be what you expect.

The access to your master domain can point to the index page of your app, and the access to the clients’ custom domain can point to the page you want of your app, but the page can be “hidden”. That means lxdglobal.com can point your index page, and linknetwork.com can point to lxdglobal.com/profile, but your clients and visitors will only see (if that’s what you expect) linknetwork.com

The SSL plugin does not work, so don’t subscribe this plugin until it works. I subscribed it as an early adopter, today I (hopefully) pay less than the current price, but I pay for something that does not work. More than 1 week without any news and guarantee that the problem is being investigated. I’m a bit disappointed. That’s life, but I’m loosing money and confidence, because if the problem is not resolved in the coming hours or days, I can’t afford using this plugin in a production app, that would be a mistake.

5 Likes