background img
Jun 13, 2020
119 Views
0 0

How to Blacklist Spam IP Address in WordPress

Written by

Blacklist IP Address do you want to block bad visitors or spam traffic from your WP website?

When a user is spamming, invalid clicks, or copying content on your site, then the best option is to block that user’s IP address so that they cannot visit your site again.

Today in this article I will tell you how to block any IP address in WordPress.

How to Blacklist IP Address in WordPress

If you want to block a visitor from your WordPress site, then you can block their IP address and prevent them from visiting the site. By blocking Spam traffic, you can save Bandwidth of your site.

Here I will tell you three easy methods to block the IP address.

So let’s start…

1. Block IP Address Through .htaccess File

You can easily block an IP address by editing your .htaccess file. If you do not know how to edit the .htaccess file, you can read this article:

To block any IP address from the website, add the IP address to your .htaccess file. This way,

order allow, deny
deny from 104.24.117.129
allow from all

Or you can see the screenshot,

If you want to block a lot of IP addresses on your WordPress site, then deny from [IP address], adding one after the other.

order allow, deny
deny from your IP address
deny from your IP address
deny from your IP address
deny from your IP address
allow from all

Note: You Do not add your IP address between # BEGIN WordPress and # END WordPress Lines.

2. IP Address Blocking Using LionScripts Plugin

The LionScripts plugin helps block spam visitors and bad IP addresses on your WordPress website. This plugin allows you to block IP addresses in two ways – Block IPs Manually and Upload IP Address (CSV Format)

First, install and activate the LionScripts plugin on your site. After activating the plugin, click on LionScripts >> IP Address Blocker and add IP Address. Then you can click on the Save Changes button to store your settings.

Blacklist IP Address

Now, this plugin will block the IP address you have added.

3. Block IP using cPanel

This is also a very easy way to block an IP address from a WordPress website. Simply, log into your web hosting cPanel. After that go to the Security section, then click on IP Blocker.

Blacklist IP Address

Now add the IP address here that you want to block from your website and then click on the Add button.

Blacklist IP Address

You have successfully blocked spam IP from your WordPress website using cPanel.

Small request, if this article has proved helpful for you, then don’t forget to share it!

Article Tags:
Article Categories:
WordPress · WordPress Tricks and Tips

Leave a Reply

Your email address will not be published. Required fields are marked *


The maximum upload file size: 300 MB.
You can upload: image, audio, video, document, text, other.
Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded.