Jimmy Legs Posted November 15, 2004 Posted November 15, 2004 the longer i keep my site, the more i am seeing spam referrals in awstats (sites show up in referral list that never actually linked to my site). isn't there something i can add to my .htaccess file to keep this from happening? Quote
TCH-Rob Posted November 15, 2004 Posted November 15, 2004 Here is a link I found that might help. distant, early morning - Referral Spamming I think it is something like; RewriteEngine On RewriteCond %{HTTP_REFERER} ^http://(www\.)?spamsite1.com.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?spamsite2.com.*$ [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?spamsite3.com.*$ [NC,OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?spamsite4.com.*$ [NC] RewriteRule \.*$ http://www.some-other-website.com [R,L] Quote
LisaJill Posted November 15, 2004 Posted November 15, 2004 *blushes* I am not good with .htaccess, and I have pulled this together from a variety of sources. If/when you look you'll note that there is some duplication. This is my .htaccess file. WARNING: There are words that some may consider uh, adult content I suppose, in there. I had to block certain words and therefore those words may be reflected in the file. If another mod sees fit to remove the link I'll understand - if that happens, people can PM me. Note that it starts from the second #Rewrite engine on "RewriteEngine On #only include this line once to enable the rewriting engine" and yes, there is some duplication - mostly because some of it works and some of it doesn't and I haven't had a chance to sit down and figure out what it all means (IE: I have not followed my own warning ) also note this warning: WARNING I have done some *very generous* banning in that file - including ALL of blogspot.com! I *highly suggest* you do not implement this without at least some understanding or a look through to make sure it matches what you want, or you may ban more than you expected. Therefore: Use of this is the responsibility of the user - especially if you just cut and paste the entire thing. .htaccess can be VERY powerful so be careful! Ok, I'm done lecturing. =) Quote
Jimmy Legs Posted November 16, 2004 Author Posted November 16, 2004 thanks folks! i'll give this a shot. what sucks is having to add such specific info to exclude stuff. seems like there should be some way of differentiating referrals that are valid form the spam, but i guess nobody ever thought this would become such a target. Quote
bellringr Posted November 16, 2004 Posted November 16, 2004 How do these sites show up in awstats to begin with? Is it done as a way to get people to go to their site? Quote
LisaJill Posted November 16, 2004 Posted November 16, 2004 These show up as referring sites in AWStats. It's done for a variety of reasons. Many people allow bots to spider their stats; and others show their referrers on their site (as a "plug back" I suppose, or bragging? ) - so this can up their pagerank. And we all know pagerank is the end all, be all of existance *note sarcasm* Jimmy: If you look through that .htaccess file you'll note that you can have "catch-alls" - for instance, I'm blocking all of "blogspot" - you could easily replace the blogspot blocks with say, "car" to block anything with "car" in the URL. There is a different method that uses only keywords - however I had massive problems with that crashing people's browsers and going into a looped redirect. BTW: These people will be delivered a 403 error - just in case you wanted to know. =) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.