

We add this to our web.config file under, just copy and paste. The partial output of our Notepad++ actions above is: The \1 is a back reference to the IP address found in (.*) and we have our web.config format ready!Īdd IP addresses to Dynamic IP Address Restrictions web.config

Notepad++ has a handy search and replace function (shortcut key: CTRL H). You might think it’s a lot of work to copy/paste each address into the web.config format: īut it isn’t. Preparing the IP addresses for web.config with Notepad++ In my case, this lists the following IP addresses: +-+ĭid you notice the one IPv6 address? All IP addresses are presumed innocent until proven guilty :-) Look up their reputation at. We use SELECT DISTINCT to list unique IP addresses. Knowing that, our query becomes: SELECT DISTINCT Akismet uses the word spam in the column comment_approved. We can easily use MySQL to list all IP addresses that match our requirements. WordPress saves the comments in the table prefix_comments. To find IP addresses belonging to spammers in your database: Find spammer IP addresses in MySQL databaseĪll real live data here. If you are on Apache, you can use mod_rewrite instead. Therefor we need the Dynamic IP Address Restrictions module. As you might know, I host my website on the IIS web server platform. There is more than one way to block comment spammers on your WordPress blog.

Further, we automate a lot of tasks with MySQL and Notepad++ (which is my text editor of choice on Windows) or VIM on your Linux Bash shell. Here on, Akismet catches about 98.53% of the spam, so I don’t have to mark a lot of comments as spam. I like that :).īlocking WordPress spammers manually may sound very time consuming, but it really isn’t. Plus, I might be able to see some trends like IP ranges that spam a lot, new IP ranges, new spam templates being used, and so on. Here is why & how:Īs long as Akismet catches the spam, I can block the IP addresses myself.
#Dotbot spam registration#
So, a little while ago I decided to remove plugins like Stop Spammer Registration Plugin and do its work myself. A second is, the less unnecessary plugins you use on your WordPress blog, the better. The less spammers hit your WordPress blog, the better your blog performs, is one of my opinions.
