Make your website inaccessible to all visitors except yourself

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.

Via .htaccess

  1. Open your browser and navigate to this link http://vodien.com/ip to see your ip address.
  2. Once you have identified your IP address, open a notepad, copy and save it there. We will require this IP address for step.
  3. Login to your cPanel account ( yourdomain.com/cpanel ). In case you forgot your cPanel login details, kindly check this guide.
  4. Navigate to File Manger and don’t forget to click show hidden files and go to public_html folder.
  5. Create a file and name it .htaccess (if it’s not present) and add the following codes inside your htaccess file.

#####
Order deny,allow
Deny from all
Allow from 112.198.251.128
#####

Please do take note that the ip address 112.198.251.128 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.

cPanel-Login-SS | IP Blocker
2) Click on IP Blocker under Security panel.

IP Blocker

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.*.*.*).

Warning:
192. as an implied IP address, if you enter 192., the system blocks access to any IP address that begins with 192.

IP Blocker

4) Click Add button to save the changes.

If you have further questions, please do not hesitate to contact our support team.

Make your website inaccessible to all visitors except yourself

(Visited 169 times, 1 visits today)