Country blocking is a technique used to restrict access to a website based on the geographic location of the user's IP address.
Note that country blocking is not foolproof and can have limitations. IP addresses can be spoofed, and people may use virtual private networks (VPNs) or proxy servers to bypass country-based restrictions. Therefore, it's often used as one layer of security or access control among other measures to protect systems and networks 💡
Block Countries
In hPanel → Websites, click on Manage next to the website in question. Then, on the sidebar, search for CDN and open its settings:
Click on the arrow > to access the CDN settings of the preferred website:
Now, open the section Traffic blocking, click on Block country, or Add country block, select the countries you want to block and click on Block to confirm:
And that's it!
Remove the Country Block
To remove a country block, in hPanel → Websites, click on Manage next to the website in question. Then, on the sidebar search for CDN and open its settings:
Click on the arrow > to access the CDN settings of the preferred website:
Now, open the section Traffic blocking, click on the trash bin icon, and then click on Delete to confirm:
Alternatively, you can also block IP addresses 💡