Blocking Spam Referral via .HTAccess

Okay, now you now how to edit your .HTAccess file and back it up - Two different ways.

So, now.... Here's the code you would add to block most of the known Spam referrals sites from within your .HTAccess file:

## BEGIN BLOCK SPAM ##
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*semalt\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*Darodar\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*Priceg\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*7makemoneyonline\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*Buttons-for-website\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*Ilovevitaly\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*Blackhatworth\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*Econom\.co [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*Iskalko\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*Lomb\.co [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*Lombia\.co [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*hulfingtonpost\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*cenoval\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*o\-o\-6\-o\-o\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*humanorightswatch\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*simple\-share\-buttons\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*sharebutton\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*s\.click\.aliexpress\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*social\-buttons\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*anticrawler\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*site12\.social\-buttons\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*adcash\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*adviceforum\.info [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*anticrawler\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*blackhatworth\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*cenokos\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*cityadspix\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*edakgfvwql\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*gobongo\.info [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*iskalko\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*kambasoft\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*luxup\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*myftpupload\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*prodvigator\.ua [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*resellerclub\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*savetubevideo\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*screentoolkit\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*seoexperimenty\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*slftsdybbg\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*socialseet\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*superiends\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*vodkoved\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*websocial\.me [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*ykecwqlixx\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*76brighton\.co\.uk [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*paparazzistudios\.com\.au [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*powitania\.pl [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*sharebutton\.net [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*tasteidea\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*descargar\-musica\-gratis\.net [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*torontoplumbinggroup\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*cyprusbuyproperties\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*4webmasters\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*ranksonic\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*best\-seo\-solution\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*get\-free\-traffic\-now\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*googlsucks\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*Buttons\-for\-your\-website\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*Best\-seo\-offer\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*offers\.bycontext\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*www1\.social\-buttons\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*website\-errors\-scanner\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*free\-share\-buttons\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*theguardlan\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*buy\-cheap\-online\.info [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*netvibes\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*guardlink\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*securesuite\.co\.uk [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*securesuite\.net [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*sitevaluation\.org [NC,OR]
RewriteCond %{HTTP_REFERER} ^https?:\/\/([^.]+\.)*forum20\.smailik\.org [NC]
RewriteRule .* - [F]
## END BLOCK SPAM ##

Yep, it's a LONG list I know!!!!! But, as you're aware with Email Spam, it's ever-evolving.

Okay, so, I have copied this into my Notepad and then copied from that into the WordPress .HTAccess Editor.

IMPORTANT:

Then, when I save I get this:

Okay, so LEAVE this browser tab open.

Check your website and ensure it is still loading properly. Any wrong character within your .HTAccess file could bring your website down. With this screen, you can REVERT back to the original with no harm done.

So, AFTER checking and rechecking to ensure your new .HTAccess file is working properly, you can click the Remove Backup file as indicated in the above image. And, then go back and create a new backup file with these changes.

Again, I also keep that Notepad Text file on my local computer as I mentioned. Two backups just in case.





Join the Discussion
Write something…
Recent messages
Darwyn Premium
Hey Peej, great training as always bro! This one is a wee bit too advanced for me at the moment my friend. I was still able to understand everything though, that's the sign of a great tutor. I have bookmarked it for the future. Thanks for continuing to bring us all along!
Cheers
Darwyn
Reply
PjGermain Premium
Thanks very much Darwyn! You're getting there!
Reply
AidenTaylor Premium
Great article man, appreciate the time it took you to write it!
Reply
PjGermain Premium
Much appreciated Aiden!
Reply
Traveller75 Premium
Have bookmarked it, Thanks
Reply
PjGermain Premium
Thanks again Wayne!
Reply
Judy-B Premium
I bookmarked it to study. Thank you. :)
Reply
PjGermain Premium
Thank you Judy!
Reply
paulgoodwin Premium
Hi PJ nice one as always - my WA anti spam has picked up Four of these so far so it is a great tool
Reply
PjGermain Premium
Thanks Paul!
Reply
Top