Create a .htaccess file and add the following code--changing the IPs to suit your needs--each command on one line each:
order allow,deny
deny from 123.45.6.7
deny from 012.34.5.
allow from all
You can deny access based upon IP address or an IP block. The above blocks access to the site from 123.45.6.7, and from any sub domain under the IP block 012.34.5. (012.34.5.1, 012.34.5.2, 012.34.5.3, etc.)
You can also set an option for deny from all, which would of course deny everyone. You can also allow or deny by domain name rather than IP address (allow from .friendsite.com works, etc.)
Was this article useful and on point?
Find out more about MonsterMegs entire range of optimized Web Hosting Services and take action today on improving your website Loading Speed, Security, and overall Stability!Most Popular Articles
What is my sites temporary url?
There are three ways to access a domain before its DNS has been pointed to your cPanel server....
Do you offer phone support?
Through years of experience in web hosting industry, we have learned that issues are never...
What are the nameservers that I can use for my account?
The nameservers for our web hosting service are the following. Please note these are anonymous...
How do I test my web site before moving the domain name to my new server?
Once your have your web site configured on your new server (or hosting account), you should test...