Knowledgebase
Portal Home > Knowledgebase > My Unique Needs > How can I block users from a certain country from accessing my site?
How can I block users from a certain country from accessing my site?
| The IP Deny Manager in your hosting account Cpanel can be used for this. You can get the latest IP ranges via http://www.countryipblocks.net/ More specifically, http://www.countryipblocks.net/country-blocks/ip-range-format/ Or if you prefer to enter it yourself in htaccess http://www.countryipblocks.net/country-blocks/htaccess-deny-format/ (the IP Deny Manager is just a front-end UI to help end-users avoid dealing with htaccess themselves)
It's probably easier with htaccess if you know what you are doing.
To update the IPs. each week (no need to do it daily), just go to the "select format" box on the right of http://www.countryipblocks.net/country-blocks/select-formats/, choose the countries, choose the format as htaccess deny, then just copy paste whatever they churn out, into your htaccess.
|
Add to Favourites
Print this Article
|
Powered by WHMCompleteSolution