CityHost.UA
Help and support

How do I block access to a website from a specific country?

The shared hosting servers use the GeoIP module, which allows you to determine the country of origin of site visitors or any other traffic, including potentially malicious traffic, based on their IP addresses. The GeoIP module allows you to easily block access to the site for users from specific countries where, for example, an excessive amount of malicious traffic, DDOS attacks and other threats have been recorded. This approach allows for effective security management and protects the website from potential threats from different parts of the world, such as the terrorist country of Russia, by returning a 403 Forbidden HTTP error to visitors.

 

The module can operate in one of two modes:

 

Access allowed from all countries except — users can access from any country except those specified in the Blocked list. Thus, you can effectively filter malicious traffic from specific countries, for example, from terrorist countries.

 

Access blocked from all countries except — users can access only from certain countries that are specified in the List of allowed. For example, the mode allows you to allow access to the site only for visitors from Ukraine, blocking all other world traffic, which can be useful during distributed DDOS attacks that damage the site's operation.

 

Where to find the GeoIP module

 

  1. Go to hosting control panel
  2. Select the hosting you need
  3. On the Sites tab, find the site, for which you want to use the GeoIP module
  4. Go to the Security tab of the desired site
  5. Scroll down the page and click the Edit button inside the GeoIP Settings block

 

Using the GeoIP module

 

  1. In the window of interaction with the GeoIP module, select one of the two modes of operation that your specific case requires. Details about the operating modes are described above on this page."
  2. Click the Select countries button.
  3. Select one or more countries that should be processed by the GeoIP module. If necessary, you can use ready-made templates, such as: countries of Africa, Asia, Europe, North/South America, just click the required template.

 

Usable information

 

• Visitors from countries for which the rule is triggered will receive an HTTP error 403 Forbidden (access denied)

• For the rule to work, you must add at least one country to the list.


• You can remove a country from the list by clicking on the cross next to its name.


• To completely disable the module and quickly clear the list of countries, click the red Disable button.


Similar articles