Select Page

How to Ban an IP Address using .htaccess

If you do not want a certain person/IP Address to access your website you can add the following code to your .htaccess file 

order allow,deny 
deny from xxx.xxx.xxx.xxx 
allow from all

In the above code replace the xxx with the IP Address that you would like to Ban accessing your website

Leave a reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.