Block Repeat Spam Offenders From Your WordPress Blog

Some excellent WordPress security tweaks can be found at this article on Smashing Magazine, including ways to protect your wp-config file and prevent hot-linking to images on your site. My personal favorite is this snippet of code entered into your .htaccess file to ban persistent spam bots from your blog:

Paste the following code in your .htaccess file, located at the root of your WordPress installation. As I said, always back up the .htaccess file before editing it. Also, don’t forget to change 123.456.789 to the IP address you want to ban.

<Limit GET POST PUT>
order allow,deny
allow from all
deny from 123.456.789
</LIMIT>

There’s almost nothing more annoying than having to clear out the same spam comments from the same IP address every day. Repeat line 4 on a new line with another address and you can ban as many spam-happy bots as you like.

This entry was posted in WordPress Tips & Tricks and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>