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

Please do take note that the ip address 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,
Range (for example,
Implied range (for example,
CIDR format (for example,
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.

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 203 times, 1 visits today)