How to deny website access for certain IP addresses?

Add the following lines to the .htaccess file located in the root directory of your website:

Order Allow,Deny
Allow from all
Deny from
Deny from

Here,, are IP addresses with denied website access.


Make sure not to block your IP address by accident. You can learn your IP address here: Learn more about blocking.