How to Protect WordPress From Malicious URL Requests

| Last Updated: | In: WordPress, WordPress Beginners, WordPress Snippets


Sometime back I am getting many malicious URL requests from spammers. I aware of this issue, when I track Google Analytics of my blog. Actually, there are many attackers are using the malicious URL request in your site.

I have done some R&D and finally find the solution to stop such type of malicious URL request from WordPress sites. In this tutorial, I will explain “How to Protect WordPress From Malicious URL Requests” to be more secure your WordPress based sites.

Open functions.php file from your current activated WordPress theme and add the below snippet at the end of the file and save it. Below code will stop the spammers from malicious URL request of your sites.

I have also written an eBook to prevent your WordPress website from hackers/attackers. It is 100% free of cost, you can download it from below link and implement all security guidelines which I mentioned in this eBook.

Download WordPress Security Guide eBook

If you are a serious WordPress developer OR WordPress website owner, then you must implement the Security Guideline in your WordPress website. It will help you to protect from hackers/attackers.


About: Prem Tiwari

Prem Tiwari is the founder of freewebmentor.com and is a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.


You may also like:


, , , , ,