cPanel: How to block visitor by country through GeoIP

To block a certain country IP range, you do not need to know which IP range it is and what you need is to use the GeoIP feature.

To install GeoIP, refer to the following URL,

Next, you will need to insert the following command to the .htaccess file,

RewriteEngine on
RewriteRule ^(.*)$ [L]

The command use to redirect China IP to***

***This is an example only and it is not to abuse any user/visitor reside in China.

Published by

Mick Genie

Mick Genie is the founder of and working at ExaBytes Network Sdn Bhd and WPWebHost web host company. He is expertise in Windows and Linux environment especially web hosting related information, tips and trick as well as the IT Information.