This is the overall best way to block pretty much all bad bots, especially for WooCommerce. If you all of a sudden getting a lot of spam comments another good thing is to start using WordPress’ built in blocker which is inside Settings.
Simply go to Settings > Discussion and scroll down a little and “Disallowed Comment Keys” start adding things like “cialis”, “drugs” whatever your spammy content has. Even block IP addresses. Any questions comment below.
User-Agent: *
Disallow:
User-agent: *
crawl-delay: 5
Disallow: /wp-admin/
Disallow: /wp-login.php
Disallow: /wp-includes/
Disallow: /wp-json/
Disallow: /*add-to-cart=*
Disallow: /cart/
Disallow: /checkout/
Disallow: /my-account/
Allow: /wp-admin/admin-ajax.php
User-agent: BLEXBot
Disallow: /
User-agent: Cliqzbot
Disallow: /
User-agent: Baiduspider
Disallow: /
User-agent: dotbot
Disallow: /
User-agent: BUbiNG
Disallow: /
User-agent: voltron
Disallow: /
User-agent: Yandex
Disallow: /
Slow Site? No problem!
Speed it up and get better Google Page Speed scores in seconds using NitroPack.
Guaranteed to blow your hair back. It’s that fast. Sign up for a free trial today!