How to limit access to my site based on geographic address?

I’m creating a marketplace app in the EU, and I want to limit access to my website to EU only in order to stay compliant with tax policies. It’s easy in EU, but I don’t have the resources to register with every national tax agency in the world at this stage.

Is there a way to have simple logic, where bubble checks for the users geographic position, and if it’s outside EU, doesn’t show the full website, but only the header, footer a text element on a blank page? The text element would say something along the lines of: “This website is not available in your region.”

Why not, a user registered can only be in EU only? eg +33, +44 numbers only?

Hi. @nico.nyberg.

You can try something like this:

1- Create a new empty page, white 50x50. Set this page as the index. Rename the old index to something where the “allowed users” would be redirected, like “landing” or something else.

2- Create a new page where the “not allowed users” would be redirected like “soon”, and display here the content your “non-allowed” users will see, like coming soon… etc.

3- We need to get the user’s I.P. to know his location. You can use Ipify: https://api.ipify.org/?format=json (there are plugins in the marketplace) or add a new connection (GET) in the API connector with the above URL.

4- Now, we need to know based on the I.P. what country it is. I suggest using Ipapi (30,000 runs/month free). Add a new connection (GET) using this URL: https://ipapi.co/X.X.X.X/json/ replace the X.X.X.X. by the I.P. from step 3 (using dynamic tags). Example: https://ipapi.co/8.8.8.8/json/

5- Based on the “country” or “country_name” response from step 4, you can decide to redirect to “landing” or “soon”.

PS: Steps 1 and 2 are optional. You also can run 3-4-5 in your current index page and if you detect any non-allowed country, redirect to x page / show pop-up / whatever.

Let me know if you have any questions,
Redu.

Thanks for the good tips! The phone number is quite simple, but I just wonder if it’s “enough” from the perspective of the tax man, i.e. would they still consider me liable if a user enters the wrong info. Verification texts are too expensive at the moment for me.

Thanks Redu for the comprehensive tips! I suspect that that is the way to go, it’s automatic and hidden from the user. Just have to do some research on how IP addresses are stored and how that would affect my site.

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