How to Block an IP Address from Accessing Your Website

In this post, we’ll see different ways to block a particular IP address from accessing your website. Let’s get started.


If you’re a Cloudflare user, then follow the below steps:

Sign into your Cloudflare account and then choose your website.

Hit “Firewall” at the top. Tap “Tools” beside the “Firewall Rules.”

Enter the IP address in the first field. Make sure “Block” and “This website” are selected in the drop-down lists. Add a note in the last field if you wish.

Now, hit the “Add”  button.

Cloudflare IP address block option

See: How to Block a Country from Accessing Your Website


If you’re a Sucuri user, follow the below steps:

Sign into your Sucuri account. Click your site URL.

Navigate to “Access Control.” Hit “Blacklist IP Addresses.”

Enter the IP address and then hit “Blacklist.”

Sucuri IP address block option


If you’re a Wordfence user, then follow the below steps:

Sign into your WordPress blog.

Hover your mouse over “Wordfence” and then hit “Firewall.”

Click on “Blocking.”

Hit “IP Address.” Enter the IP address and the reason for blocking the IP address in their corresponding fields.

Click on “Block This IP Address” button.

Wordfence IP address block option


If you’re a SiteGround customer, follow the below steps:

Sign into your SiteGround account. Now, navigate to the “cPanel.”

Find and hit the “IP Address Deny Manager.”

Enter the IP address in the filed and then click on the “Add” button.

SiteGround IP address block option

See: SiteGround Cloud Hosting Review


Open the .htaccess file of your website and then add the following to it:

Deny from IP Address

Make sure to replace “IP Address” with the IP address you want to block and save the change.

I hope that this post is useful to you. Like this post? Please share it with your friends.

Disclaimer: This post may contain affiliate links which means I will receive the commission (at no additional cost to you) when you purchase the product via my links. Thanks for your support.

Also see:

How to Delete a View in Google Analytics

Scroll to Top