This trick has been discussed in the WordPress Codex and the Support forums but I’d like to echo it here again for those who haven’t had the chance to learn about it and still suffering from comment, track-back and referral spam.
If you’re using the WP ShortStats plugin, you’d have noticed by now that you’re getting referrals from sites that targets your wp-comments-post.php which shouldn’t be the case because they’re internal WordPress files. This is an indication that your blog is being targetted for referral spam or trackback spam.
One of the earlier fixes I added in my .htaccess was a rewrite rule to supposedly block the referral spam:
RewriteCond %{HTTP_REFERER} “!^http://www.yugatech.com/blog/.*$” [NC]
RewriteCond %{REQUEST_URI} “.*wp-comments-post.php$”
RewriteRule .* – [F]
That seemed to help stop it by about 90% or so which is quite effective IMO. Still there’s the trackback spam to consider, so here’s one tip you can implement in your WP theme:
1) Find the file wp-comments-post.php and rename it to something else (e.g. i-get-no-spam.php). This file can be found in your root WP folder.
2) Next, look for the file comments.php in your active WP theme folder and edit instances of the term “wp-comments-post.php” to match that of what you renamed it to.
If you’re running some other comments related plugin, like Paged Comments, there might be some slight changes in the steps but that’s the general idea.
That’s it. Now them spam bots that have bookmarked your wp comment form would get a 404 error next time.
YugaTech.com is the largest and longest-running technology site in the Philippines. Originally established in October 2002, the site was transformed into a full-fledged technology platform in 2005.
How to transfer, withdraw money from PayPal to GCash
Prices of Starlink satellite in the Philippines
Install Google GBox to Huawei smartphones
Pag-IBIG MP2 online application
How to check PhilHealth contributions online
How to find your SIM card serial number
Globe, PLDT, Converge, Sky: Unli fiber internet plans compared
10 biggest games in the Google Play Store
LTO periodic medical exam for 10-year licenses
Netflix codes to unlock hidden TV shows, movies
Apple, Asus, Cherry Mobile, Huawei, LG, Nokia, Oppo, Samsung, Sony, Vivo, Xiaomi, Lenovo, Infinix Mobile, Pocophone, Honor, iPhone, OnePlus, Tecno, Realme, HTC, Gionee, Kata, IQ00, Redmi, Razer, CloudFone, Motorola, Panasonic, TCL, Wiko
Best Android smartphones between PHP 20,000 - 25,000
Smartphones under PHP 10,000 in the Philippines
Smartphones under PHP 12K Philippines
Best smartphones for kids under PHP 7,000
Smartphones under PHP 15,000 in the Philippines
Best Android smartphones between PHP 15,000 - 20,000
Smartphones under PHP 20,000 in the Philippines
Most affordable 5G phones in the Philippines under PHP 20K
5G smartphones in the Philippines under PHP 16K
Smartphone pricelist Philippines 2024
Smartphone pricelist Philippines 2023
Smartphone pricelist Philippines 2022
Smartphone pricelist Philippines 2021
Smartphone pricelist Philippines 2020
kutitots says:
you might need to rename the “comments.php” within the code of the template file too because it’s part of the conditional statement. It’s actually on secode line of the code in comments.php (when you open it up in Notepad).
AnP says:
heaven sent tip! thanks!
pinoywebdev says:
wordpress comes with security fixes and are updated every time a new issue arises. even so, every now and then problems do came up.., this discourages me to came up with my own version of php-mysql powered blog.. I am poor when it comes to security consideration — I don’t even know how spammers could destroy my site =(
jhay says:
I’d like to implement this fix, but I’m afraid I might end up messing up my WP installation, hehehe
Will probably do it on a test blog first. Great how-to by the way.
Mita says:
great timing…been having problems with that lately. salamat!
SELaplana says:
my blog is actually not using the Akismet Technology to avoid such spam comments. However, I successfully avoid these things by installing the Mathematics comment plugin, which is not capable of controlling spam pings for trackbacks.
Thanks for echoing this topic. this hack willl really help.
7KoiL8U5k4 says:
Hi! Very nice site! Thanks you very much! mwLJFRdz2PKhXF
JackyMool says:
Who can help me with .httpaccess ?
where i can fined full information about .httpaccess file syntaxis?
vanja says:
Improves erectile function no side effect medicine
project management says:
I always spent my half an hour to read this weblog’s content all the time along with a mug of coffee.