How to prevent malicious bots from visiting my website

During a targeted attack towards your website it is common that malicious bots will access your web site attempting to gain access via brute force for example. This in turn will commonly result in multiple script executions and will greatly increase the resource usage of the hosting account.

While SiteGround implements a large set of additional security rules on web server level, it is always good to have additional means of protection in order to avoid issues caused by such unauthorized access.

We recommend two approaches in this case, that proved to be most helpful:

  • Add an additional plugin for your application that prevents such attacks. For example a nice option for WordPress is the Wordfence security plugin and the alternative for Joomla users is developed by us jHackGuard plugin.
  • Use a set of .htaccess rules that will prevent malicious requests towards your website. A good one that you can use out of the box for pretty much any general case is the 6G Firewall. You can find more information on its developer website. The exact rules you can add to your .htaccess are also included below:

***Note that above rules will disallow requests via Temporary URL to your website - e.g.

You find this article useful? Click here to learn more about SiteGround web hosting experts and what else we can do for you!