Home Web Hosting Banning IP Users Manually Blocking Spam IP Address in WordPress Comments/Forums

Manually Blocking Spam IP Address in WordPress Comments/Forums

17
Manually Blocking Spam IP Address in Wordpress Comments/Forums
Manually Blocking Spam IP Address in Wordpress Comments/Forums

There are many different ways to block Spam Ip address on WordPress comments and WordPress supported forums by using .htacess file or “IP blocker”.

A simple way of blocking IP addressed in WordPress is by using the .htaccess file. That’s if spam bot prevention such as google re-captcha and similar plugins fail.

Blocking IP Spam Address in WordPress Comments/Forums

Block Spam IP using .htaccess file

.htaccess location in folder
.htaccess location in folder

The easiest way to block any IP address is by using the .htaccess file usually located in the website folder (if you don’t have a file named .htaccess just create one), simply open your “.htaccess” file and add this script right at the end, these are some of the common spam Ip addressed which leave spam comments on WordPress blogs, of course, you will need to add your own deny IP addresses as you go.

# END WordPress
<Files 403.shtml>
order allow,deny
allow from all
</Files>
deny from 148.72.153.211
deny from 46.118.239.91
deny from 216.244.66.232
deny from 106.13.235.81
deny from 39.104.235.66
deny from 61.19.69.181
deny from 129.211.126.15
deny from 141.98.80.95
deny from 112.124.0.114
deny from 216.244.66.234
deny from 109.234.37.227
deny from 178.213.189.11
deny from 45.131.7.11
deny from 178.159.37.172
deny from 5.172.204.194
deny from 109.70.100.55
deny from 78.138.157.42
deny from 179.61.180.227
deny from 62.210.202.34
deny from 185.117.118.252

Block Spam IP using “IP blocker” on Cpanel

You can simply use an “IP blocker” located on most modern web hosting providers that use Cpanel. This will automatically edit your .htaccess file and add the same code above to your .htaccess files.

Block Spam IP using "IP blocker" on cpanel

When you open the “IP blocker” you can simply add your IP address in the input text box and click on “Add” to add the IP to your blocked IP database, you can also block domain names and IP ranges.

Block Spam IP using IP blocker
Block Spam IP using IP blocker

Note: You can specify denied IP addresses in the following formats:

Single IP Address
192.168.0.1
2001:db8::1
Range
192.168.0.1-192.168.0.40
2001:db8::1-2001:db8::3
Implied Range
192.168.0.1-40
CIDR Format
192.168.0.1/32
2001:db8::/32
Implies 192.*.*.*
192.

You can simply remove IP addressed by deleting them from the IP blocker database. located under “actions tab”

Deleting Ip Addresses from Ip blocker in cpanel
Deleting Ip Addresses from Ip blocker in Cpanel