Forum Moderators: phranque
# Block Referrer Spam
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://.*someotherwebsite\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*someotherwebsite\.ru/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*someotherwebsite\.org/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*anotherwebsite2\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*anotherwebsite3\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*anotherwebsite4\.com/ [NC]
RewriteRule ^(.*)$ – [F,L]
[edited by: aakk9999 at 12:33 pm (utc) on Sep 22, 2016]
[edit reason] Exemplified [/edit]
The problem is I do not have any such page on my website.
RewriteRule ^(.*)$ – [F,L]
RewriteRule ^ - [F] keyplyr: What do you see when you look at that other site?** When I open that site it redirects to an another URL (GA tagged) which has only one page with a share button code.
keyplyr: Is any of your content there? Is your site being framed by the other site?** No it does not have any contetn/code/design of my website.
whitespace: How is your site responding to such requests?** My site is responding 404.
not2easy: If it is referrer spam, there are more efficient ways to block it.** I think you are right and it is a referrer spam. I searched on the internet and used that htaccess code to block it. But the things is that I have to check each time in the report and add a code for each individual website.
1. What are the other possible way to block it and why my website is being tragetted for such spam activities?
2. Is there any security flaws on the server which I can get fixed in some way to stop this?
#referrer spam
RewriteCond %{HTTP_REFERER} (for-your-|gratis|semalt|someotherwebsite)
RewriteRule .* - [F] where you separate the blocked referrers within parentheses ( ) using | so that in this example you are blocking four different spammers: "buttons-for-your-website", any of the "gratis" variety, "semalt" and any with "someotherwebsite".
I have noticed some unusual traffic on my website, it is showing -
Landing Page - www.mywebsite.com/www1.some-other-website.tld
Sessions - 120
% New Session - 100.00%
New Users - 120
Bounce Rate - 2.50%
Pages/Session - 2.90