Articles on: cPanel Tutorial

How to Make Your Website Inaccessible to All Visitors Except Yourself?

In the previous tutorial How to Deny an IP or Domain in cPanel, you can block any ip addresses from accessing your cPanel but in this tutorial you can make your website inaccessible to all visitors except yourself.


Here are the steps for your reference:


.HTACCESS METHOD



1) Open your web browser and visit www.whatismyip.com in order to obtain your current ip address.



2) Once you have identified your IP address, open a notepad, copy and save it there.
Login to your cPanel.



3) Navigate to File Manager and don’t forget to click show hidden files and go to public_html folder.



4) Create a file and name it .htaccess and insert the following code:


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



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

Updated on: 16/08/2018

Was this article helpful?

Share your feedback

Cancel

Thank you!