A
A
Alexander Freidin2020-12-25 14:29:52
JavaScript
Alexander Freidin, 2020-12-25 14:29:52

How to block access to a site based on country membership using HTML code?

Hello, the site is located on WIX.com, unfortunately the platform does not provide restrictions / blocking by IP or by language.
Since the site is on Wix, I don’t understand all the nuances in principle. I was able to install the preloader only a month later, and then with the help of an SEO specialist ..
Problem:
The site is English-language, an online store, with unique English-language descriptions of goods (I translated and translate daily on my own, it's really very difficult). Users from Russia visit the site, but their session lasts no more than 10 seconds, but one fine day, a user from Reutov was stuck on the internal search results page for several hours. As a result, I find my descriptions on several sites, where everything is much cooler with link load, optimization and search results, unlike me.
I understand that there is no escape from data parsing, as I see everywhere. But nevertheless, I want to do everything possible so that when a Russian-speaking user goes, a redirect to a dead end occurs (error 403).
This is possible only in two ways on Wix: HTML code or javascript (which can be disabled in any browser...)
Please write how the code should be correctly written for Russia with a redirect to a 403 error
. And what consequences may arise for site performance if the code will work.
I would really appreciate the help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kovalsky, 2020-12-25
@lazalu68

And why is it necessary to do it at the front? This is done on the server. If suddenly the problem is in Wix, then as far as I know, you can always transfer the site from Wix to another hosting, where you can manage the access zone, you can configure it so that users from the Russian Federation go through the forest,
you definitely cannot throw 403, but you can limit the content given to the client. There are a lot of public geolocation services, including reliable ones such as Google and Yandex. Send a request there , get information about the location of the user, perform some appropriate actions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question