Adding the following directives to your .htaccess files allows you to control which bots are denied and allowed to access your forum.
Enter the above directives into your .htaccess file as shown here:
Code:
# Deny and Allow bots by User-Agent
SetEnvIfNoCase User-Agent "bot|crawler|fetcher|headlesschrome|inspect|spider" bad_bot
SetEnvIfNoCase User-Agent "bingbot|duckduckgo|googlebot|yahoo" good_bot
Deny from env=bad_bot
Allow from env=good_bot
Enter the above directives into your .htaccess file as shown here: