Can you block web traffic from Luxembourg?

  • Answered
Can't you just block any pings from Luxemburg?
Hello Marcstrong, You can block IP ranges by country. In fact, we have an article on it called How to Block Country IPs in .htaccess. Please follow the directions in this article for the modifications to your website. However, you may also want to block referrers, because a Luxembourg website address isn't necessarily only in Luxembourg. It can be hosted elsewhere. So you should also add the following code at the TOP of your .htaccess file: RewriteEngine On RewriteCond %{HTTP_REFERER} ^.*(\.lu).*$ [NC] RewriteRule .* - [R=403,L] The .LU portion of the code blocks any website that ends with ".lu". If you want add multiple countries, then the format will look like this: RewriteCond %{HTTP_REFERER} ^.*(\.ru|\.su|\.cn|\.ca|\.in|\.eu|\.mx|\.fr|\.ua|\.pt|\.il|\.de|\.uk).*$ [NC] That's an example of blocking multiple referrers in case you need it. Remember that this code should be at the top of your .htaccess file. I hope this helps to provide the information you require. The instructions in the article on blocking IP takes you through the steps to modify your .htaccess file using the cPanel File manager's editors. Please let us know if you require any further assistance. Regards, Arnel C.