If you want to block risky bots or major SEO crawlers like Ahrefs, Moz, SEMrush, and others, follow this simple guide:
1. Log in to your PBN Hosting dashboard and go to the Product Details page.
2. Select the domain where you want to block the bots.
3. Click the three dots (⋯) in the Action column for that domain and choose Login to cPanel.
4. It will automatically open a new tab. In the cPanel dashboard, click the File Manager option under the Files section.
5. In the File Manager, double-click the public_html folder to open it.
6. Click the Settings button in the top-right corner. A popup box will open check the box for “Show Hidden Files (dotfiles)” and click Save.
7. Now you’ll see the .htaccess file inside the public_html
folder. Right-click on it and click Edit.
8. In the dialog box that appears, click Edit again to open the file editor.
9. Add the following code to block common SEO and risky bots:
SetEnvIfNoCase User-Agent .rogerbot. bad_bot
SetEnvIfNoCase User-Agent .exabot. bad_bot
SetEnvIfNoCase User-Agent .mozbot. bad_bot
SetEnvIfNoCase User-Agent .dotbot. bad_bot
SetEnvIfNoCase User-Agent .gigabot. bad_bot
SetEnvIfNoCase User-Agent .sitebot. bad_bot
SetEnvIfNoCase User-Agent .ahrefsbot. bad_bot
SetEnvIfNoCase User-Agent "MJ12bot" bad_bot
SetEnvIfNoCase User-Agent "coccocbot-image" bad_bot
SetEnvIfNoCase User-Agent "Baiduspider" bad_bot
SetEnvIfNoCase User-Agent "SemrushBot" bad_bot
SetEnvIfNoCase User-Agent "DotBot" bad_bot
SetEnvIfNoCase User-Agent "AlphaBot" bad_bot
SetEnvIfNoCase User-Agent "ZoominfoBot" bad_bot
SetEnvIfNoCase User-Agent "ADmantX" bad_bot
SetEnvIfNoCase User-Agent "Heritrix" bad_bot
SetEnvIfNoCase User-Agent "Indy Library" bad_bot
SetEnvIfNoCase User-Agent "Mail.Ru" bad_bot
SetEnvIfNoCase User-Agent "PHPCrawl" bad_bot
SetEnvIfNoCase User-Agent "BLEXBot" bad_bot
SetEnvIfNoCase User-Agent "magpie-crawler" bad_bot
SetEnvIfNoCase User-Agent "SeznamBot" bad_bot
SetEnvIfNoCase User-Agent "seoscanners.net" bad_bot
SetEnvIfNoCase User-Agent "ZumBot" bad_bot
SetEnvIfNoCase User-Agent "Yandex" bad_bot
SetEnvIfNoCase User-Agent "MaxPointCrawler" bad_bot
SetEnvIfNoCase User-Agent "Nutch" bad_bot
SetEnvIfNoCase User-Agent "Buzzbot" bad_bot
<Limit GET POST HEAD>
Order Allow,Deny
Allow from all
Deny from env=bad_bot
</Limit>
You can remove or add any bot line to unblock or block specific bots as needed.
10. After adding the code, click Save Changes.
Note: By default, PBN Hosting already blocks most major SEO and risky bots. However, you can customize the list anytime.
If you're unsure how to edit this file or prefer not to make changes yourself, feel free to contact our support team for help.