There are two ways you can block someone from visiting your website.
If you know their IP address, you can block them by using the IP Address Blocking tool.
Using .htaccess to block by IP address
If you know their IP address and know where your .htaccess file is, you can also block them by pasting in code into your .htaccess file.
order allow,deny
deny from 111.222.33.444
allow from all
You can include as many IP addresses as you wish, with each on a new line and with ‘deny from’ preceding the address.
If you want to block a range of IP addresses, leave off the last set of numbers. For example, ‘deny from 111.222.33.’ will block not only 111.222.33.444, but also 111.222.33.1, 111.222.33.500, 111.222.33.22, and all numbers before, after, and in between.
If you do not know the IP address, but know the ISP, you can also block them by including the ISP in your .htaccess.
Order allow,deny
deny from spam-isp.com
alloy from all
Article ID: 500
Created On: Tue, Mar 17, 2015 at 4:12 PM
Last Updated On: Thu, Apr 23, 2015 at 12:40 PM
Online URL: https://www.heartinternet.uk/support/article/how-can-i-block-someone-from-visiting-my-site.html