HostCupid
HostCupid Knowledgebase

How to ban any IP Address via .htaccess?

If someone is trying to hack your website or you want to block their IP Address, you can add this line to your .htaccess file.order allow,denydeny from IP-ADDRESSallow from allReplace "IP-ADDRESS" with the IP Address you want to block.

Security 15329 views
If someone is trying to hack your website or you want to block their IP Address, you can add this line to your .htaccess file.


order allow,deny
deny from IP-ADDRESS
allow from all


Replace "IP-ADDRESS" with the IP Address you want to block.

Continue learning

More HostCupid guides

Explore related website, hosting, WordPress, security and reseller topics.

Knowledgebase14649 views

How to protect your .htaccess file?

For security purpose we recommended you to prevent access to your .htaccess file from unauthorized access.Add this code to your .htaccess file:# .htaccess protectionorder allow,denydeny fro…

Read article →