How to make your website inaccessible to all visitors except yourself? You may want to do it for security purposes and there are 2 ways to do that. Please be guided by the instructions from this article.
- Open your browser and navigate to this link http://vodien.com/ip to see your ip address.
- Once you have identified your IP address, open a notepad, copy and save it there. We will require this IP address for step.
- Login to your cPanel account ( yourdomain.com/cpanel ). In case you forgot your cPanel login details, kindly check this guide.
- Navigate to File Manger and don’t forget to click show hidden files and go to public_html folder.
- Create a file and name it .htaccess (if it’s not present) and add the following codes inside your htaccess file.
Deny from all
Allow from 220.127.116.11
Please do take note that the ip address 18.104.22.168 is just an example.
Once done, save it and clear your browser’s cache.
After that, all your visitors won’t able to view your website except you, unless you remove the codes above.
Through IP Blocker
The IP Blocker interface allows you to block access to your site for one or more IP addresses or fully qualified domain names (FQDNs). Please refer to below steps to block IP to access your site.
1) Log into your cPanel.
2) Click on IP Blocker under Security panel.
3) Enter the IP address or range in the IP Address or Domain text box. You can enter IP addresses in any of the following formats:
Single IP address (for example,192.168.0.1).
Range (for example, 192.168.0.1-192.168.0.99).
Implied range (for example, 192.168.0.1-99).
CIDR format (for example, 192.168.0.1/99).
Implied IP address (for example, 192.*.*.*).
192. as an implied IP address, if you enter 192., the system blocks access to any IP address that begins with 192.
4) Click Add button to save the changes.
If you have further questions, please do not hesitate to contact our support team.