How to route two different Bubble apps to different sub domains?

Hey team, just a quick question after searching the forums.

Things have changed with the way Bubble handle’s the management of custom domains. Before you were issued an IP address per app, and this made it relatively easy (if you know what you’re doing with DNS) to have different subdomains point to different applications on Bubble.

However, now you need to use CNAME and ALIAS records pointing to the hostname app.bubble.io.

This change has caused some confusion which doesn’t seem to be covered in the help documentation regarding sub domains.

Can someone provide some insight into how I would do the following:

Bubble App A (English Version) (EN): en.domain.com
Bubble App B (Japanese Version) (JP): jp.domain.com

Bubble App A and B are the same app (functionally), just hosted on two separate Personal Plans.

The first question is, what CNAME and ALIAS records would I need to support this approach given that neither of my sites go to www.domain.com?

Would it be:
CNAME en app.bubble.io
CNAME jp app.bubble.io
ALIAS @ app.bubble.io

How would Bubble know to direct traffic coming via jp.domain.com to japan.bubbleapps.io instead of english.bubbleapps.io ?

Are there likely to be any security issues with the above set up?

Thanks.

2 Likes

Hi @universe

The way I operate is to use the user IP to redirect to the platform of my choice. So the main page ‘when page is loaded’ simply redirects to the correct URL or I change the language to the language of the country user. If the majority of your customers are USA, then the home page will always be in English.

If the goal is to use multiple Bubble apps, I do not recommend it. It’s getting very complicated imo. However, on the day you are in business, I recommend using the expert plan that allows you to create a ‘sub app’ copy and thus maintain a single application for all ‘sub apps’.

1 Like

Thanks for the suggestion John, but I’m not looking for a way to direct users based on their IP.

I’m specifically looking for the correct DNS settings required if I wish to point sub domains to different Bubble applications.

I think I have managed to find a solution, but it is just in theory at this point, so anyone else facing the same issues looking for a solution your results may vary…

To get the following configuration working here’s what I’ve found works:

domain.com (standard website, non-bubble),
nz.domain.com (bubble app A),
jp.domain.com (bubble app B), and
au.domain.com (bubble app C)

You need to configure something like this in DNS for your domain.com:
NZ CNAME IN 300 app.bubble.io <-- this points nz.domain.com to app.bubble.io, etc
JP CNAME IN 300 app.bubble.io
AU CNAME IN 300 app.bubble.io
@ A IN 300 10.0.0.1 <-- this sends all traffic not specified by a CNAME to a/your web server IP address (eg. Wordpress instance at 10.0.0.1)
WWW CNAME IN 300 domain.com <-- this points www.domain.com to your web server.

With the above setup, going to domain.com or www.domain.com takes me to the Wordpress web server as expected.

Going to nz.domain.com takes me to Bubble application A.

In theory, going to jp.domain.com and au.domain.com should take you to Bubble application B and C respectively. That is once your apps are on personal plans and you’ve completed the Custom Domain section of the respective apps.

Hope these findings help someone else.

Official comment would be appreciated.

1 Like

Following up on this, I have now tested this configuration successfully on multiple paid personal plans. NZ, AU and JP all correctly direct to the right application within Bubble. SSL works, too.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.