How to block search bots from accessing your site?

In order to block all bots from accessing your site, you should create a robots.txt file with the following content:

User-agent: *
Disallow: /

To block all bots from accessing a specific folder, you should create a robots.txt file with the following content:

You can create/modify the robots.txt file via File Manager in cPanel.

Please note that blocking all bots will get your site deindexed from search engines.

However, malicious bots will not take the robots.txt file into consideration. Moreover if you get a targeted attack towards your website trying to gain access via brute force access for example, you will need a different approach. For more information you can check the following article:

How to prevent malicious bots from visiting my website

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