You can disable external comment requests for WordPress. The following steps block requests to the wp-comments-post.php file that come from outside your WordPress site, which can help prevent comment SPAM.
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*yourdomain.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) http://%{REMOTE_ADDR}/$ [R=301,L]
Now it will be more difficult for comment SPAM bots to post on your WordPress pages and posts.
Article ID: 1223
Created On: Tue, Nov 17, 2020 at 6:49 PM
Last Updated On: Tue, Nov 17, 2020 at 6:49 PM
Online URL: https://www.heartinternet.uk/support/article/disable-external-wordpress-comment-requests.html