Forum Academy Marketplace Showcase Pricing Features

URL Country Redirection

Hi Bubble,

I am new to bubble but excited to use its excellent approach towards app development.

I want to know how to implement url redirection based on the location of app visitor. e.g. if the basic url is, a visitor from uk should automatically be landing on

Also please advise about the following:

  1. Do i need to design a seperate page for the visitors of each country ?
  2. Do i have to create seperate database for each country ?

Please advise the best approach to manage this type of app.
I dont want to use any paid 3rd party service.

What type of app exactly are you building? A single app operates with a single database, but there are many ways to segment your data with custom data types and fields. For example, a geographic address field could do a lot to help break up users by country.

In the most general of approaches, you can have a predefined list of regions in your database under a Region data type. That type could contain a text field for the path (e.g. “UK” or “south-america”). You could create a condition like the following:

When page is loaded > navigate to external site > your for region:first item’s path

Where the search has a constraint: country = current geographic position :extract country.

This is just one way to do something like that, but depending on your needs your set up might require other things.

Gaby | Coaching Bubble

1 Like

Thanks a lot for the reply!!!

It looks very logical solution for my app but the only problem here is that the action will be triggered once the index page is fully loaded. I mean the visitor will 1st see and then after 1 or 2 seconds it will be redirected to the new page ( etc).

One possible work around is that i can leave my index page empty while back-end logic will do the redirect function. But this will cause a long delay in loading the desired page and doesn’t not looks very effective solution.

How can i minimize this delay or trigger an action just after basic ULR request is submitted. or any other useful suggestions plz…

You could have a more designed loading page on index rather than white nothingness. Take that opportunity to introduce your branding with logo, colors, etc. It will only be for a few seconds. The user will need to accept the browser’s prompt for allowing location to be known. Otherwise, your index could be specifically to select a region. No auto-redirecting or anything. They select from a dropdown or search box and then from that selection takes them to the appropriate page.

1 Like

Any other possible solution to have redirection as efficient as the one used by google…???

any possibility of using HTTP header parameters…???

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