Category Archives: Wordpress

WordPress: prevent comment spam on wordpress

Hi,

on wordpress based websites comment spam is all around.

If you are hosting WordPress on a apache webserver there is a simple but effective way to refuse automatically created comment spam from bots:
Redirect all HTTP Post requests directed to the wordpress comment form (wp-comments-post.php) and which do not have a referer from your site or has an empty User-Agent string away from your site. For example to the bots localhost 🙂

The only requirement is the apache module mod_rewrite and a .htaccess file in the root folder of your blog.

If not exists, create a .htaccess file within the root directory of your blog, or add the following directive to an already existing .htaccess file. Replace “www.yourdomain.com” with the address of your website.
Continue reading WordPress: prevent comment spam on wordpress