If one IP address keeps spamming your website how do you block this IP address and stop it from sending you spam message? Can you block it permanently so it can no longer access your website?
in Websites + Social Media by 6 24 64
If you want to block an ip address from accessing your website you can use this code by editing the htaccess file.

Go to to the sitess root directory and edit the .htaccess file. You may need to change the option in your control panel to show all files including hidden files (only if needed). In most cases it will not be hidden
Select htaccess file and click on edit.

Copy this code in it anywhere below rewrite mod (or below all codes)

Eg: Deny from

Note: Replace the ip address to the specific ip address instead of

Save the htaccess file and you're done.

1 Answer

0 votes
You can use vpn service which will relocate your IP address.One of the best services are BETTERNET which is free and you can find on playstore.
by 2 9
4,249 questions
15,744 answers
4,200 users