GeoIP refers to the method of locating a computer terminal's geographic location by identifying that terminal's IP address. GeoIP is supported in both hPanel hosting and cPanel/WHM hosting.

How to activate?

In order to activate GeoIP all you have to do is enter the following line in your .htaccess file:

GeoIPEnable On

After adding, you can verify if it's working by checking your PHP Info file, you can create it using following tutorial:

Following server variables should appear in PHP info file:


NOTE: You don't need to download GeoIP databases as we handle this for you, we update our GeoIP databases weekly.

Example: Block wp-login.php from certain countries

For example, to block WordPress wp-login.php or xmlrpc.php access from countries not in (GB|DK|US|IN):

GeoIPEnable On
RewriteEngine on
RewriteRule (wp-login|xmlrpc).php$ - [F,L]

Did this answer your question?