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 all Replace “IP-ADDRESS” with the IP Address you want to block. Updated on October 31, 2020 Was this article helpful? Yes No Related Articles How to Disable the Two-Factor Authentication on Your cPanel Account? How to Enable the Two-Factor Authentication on Your cPanel Account? How to Enable or Disable Mod Security in cPanel? How to restrict directory access by IP address? How to protect your .htaccess file? How to disable directory browsing using .htaccess? Need Support?Can’t find the answer you’re looking for? Don’t worry we’re here to help!Open Support Ticket