1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Stopping Referrer Spam

Discussion in 'Traffic Analysis' started by Smyrl, Mar 13, 2005.

  1. #1
    Two Questions

    1. Will banning the IP of the site spamming my log files keep spammer out?

    2. If I use .htaccess to combat the spam and want to block the domain myjunk dot com and all subdomains can it be done with the one line

    RewriteCond %{HTTP_REFERER} ^http://www\.)?myjunk.com.*$[NC,OR]

    or will I have to specify each sub domain seperately?

    Thanks for your help.

    Shannon
     
    Smyrl, Mar 13, 2005 IP
  2. Bernard

    Bernard Well-Known Member

    Messages:
    1,608
    Likes Received:
    107
    Best Answers:
    0
    Trophy Points:
    185
    #2
    I'm not an expert on this, but in answer to Q1, I think the answer is no. Referral spam is usually handled by a program and they can usually be configured to operate through proxies, so the the spam is not necessarily coming from the same IP as the site they are "promoting".
     
    Bernard, Mar 13, 2005 IP
  3. Smyrl

    Smyrl Tomato Republic Staff

    Messages:
    13,740
    Likes Received:
    1,702
    Best Answers:
    78
    Trophy Points:
    510
    #3
    Thanks, Bernard. What you said made sense.

    I have made an attempt at altering a .htaccess file for first time today. Since I have never touched one before I do not know whether it will work or not but at least I can still reach site.

    Shannon
     
    Smyrl, Mar 13, 2005 IP
  4. neterslandreau

    neterslandreau Peon

    Messages:
    279
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I'm not sure what you mean by Referer Spam but I always get crackers trying to hack into my servers. When I notice someone attempting to breach my security, I add the IP to my hosts.deny file and deny them access to my machine, period.
     
    neterslandreau, Mar 15, 2005 IP
  5. Smyrl

    Smyrl Tomato Republic Staff

    Messages:
    13,740
    Likes Received:
    1,702
    Best Answers:
    78
    Trophy Points:
    510
    #5
    neterslandreau, I am not the best person to describe referrer spam. You really should read something about it. If you look at your stats and the list of referrers you will see URLs for sites that have no liinnks to your pages. Porn, pharmeseuticals, gambling sites are among the worst.

    I have read three stop-gap methods of altering your .htaccess file if you are running Apache. Since I know nothing about syntax for coding and am such a horrid typist I hated to touch mine but touch two I have. I will be watching to see if I continue to get spam.

    It seems we all need to understand the blackest of black hat to try protect our sites.

    Shannon
     
    Smyrl, Mar 15, 2005 IP
  6. Bernard

    Bernard Well-Known Member

    Messages:
    1,608
    Likes Received:
    107
    Best Answers:
    0
    Trophy Points:
    185
    #6
    ... and web hosting companies.
     
    Bernard, Mar 15, 2005 IP
  7. neterslandreau

    neterslandreau Peon

    Messages:
    279
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #7
    That's very sad, isn't it?

    BTW, I googled referrer spam, saw all kinds of ways to protect against it (thank you :)), but in all the time I've been admin'ing sites, I've never run across this problem, or at least never realized I was being exploited. :eek:
     
    neterslandreau, Mar 15, 2005 IP
  8. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Some of them operate from behind a DSL connection and blocking these addresses is impractical - who knows, may be somebody who'd get the address next would buy something from you :) I do check on a case-by-case basis who's the owner of the IP address and if it's a dedicated server, I usually block it for some time.

    You didn't show the rule, so I'm assuming that you are redirecting spammers somewhere else. I haven't checked, but I would think that in this case the log line would still show the spamming referrer, which kind of defies the purpose of this exercise. Some log analyzers process log lines with HTTP errors differently, so if you return some error (e.g. 404, not found), you may avoid this referrer in the reports.

    J.D.
     
    J.D., Mar 15, 2005 IP
  9. john_loch

    john_loch Rodent Slayer

    Messages:
    1,294
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    138
    #9
    Hi Smyrl,

    The only static way to kill referrer spammers is by IP. Unfortunately that's the crux of it. The only dynamic way to do this (that I've used) is to look for discreet requests to pages or specific files that:
    a. are files that should have a local referrer (ie images/css files that are typically subrequests of a page) or:
    b. Should result in subrequests for images and the like (ie .html, .php etc) but don't.

    This will be problematic for users who either:
    a. Use text browsers (ie Lynx etc)
    b. Use custom software for the visually impaired.

    At the end of the day though (no matter how you garner the info), you end up having to filter them on an IP basis.

    Bit of a bugger really :|

    Cheers,

    JL
     
    john_loch, Mar 16, 2005 IP
  10. Smyrl

    Smyrl Tomato Republic Staff

    Messages:
    13,740
    Likes Received:
    1,702
    Best Answers:
    78
    Trophy Points:
    510
    #10
    Thank each of you for your replies.

    I will continue making attempts to block spam.

    Shannon
     
    Smyrl, Mar 16, 2005 IP
  11. SEbasic

    SEbasic Peon

    Messages:
    6,317
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Keep us informed...

    Referral spam on my sites has been increasing steadily over the past few months and It's now really starting to tick me off.
     
    SEbasic, Mar 16, 2005 IP
  12. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Isn't referral spam only an issue when you have public stats that can be indexed by the spiders?
     
    T0PS3O, Mar 16, 2005 IP
  13. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Very good point. Everybody has to make sure that access to all stats pages is properly authorized. At the very minimum all stats pages must have noindex and nofollow meta tag defined.

    J.D.
     
    J.D., Mar 16, 2005 IP
  14. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #14
    I just password protected (htaccess) my webalizer stats folder. The way I understood the phenomenon is that it's killed by doing just that.

    No access = no index = no link popularity = no reason to spam

    Searching Google for two distinct webalizer (or similar stats package) lines of text (including the misspelled :eek: explaination) shows who can be spammed successsfully:

    http://www.google.co.uk/search?hl=e...terms."+"webalizer+version"&btnG=Search&meta=

    Just 47 results but if you get creative with the search there must be millions.
     
    T0PS3O, Mar 16, 2005 IP
  15. SEbasic

    SEbasic Peon

    Messages:
    6,317
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #15
    They still spam you either way.

    My stats are protected on all of my sites.
     
    SEbasic, Mar 16, 2005 IP
  16. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Some of these pesky spammers make a quite few hits in order to be noticed and this distorts the stats for some sites quite a bit. Blocking IP's or doing some other filtering helps to avoid this problem.

    J.D.
     
    J.D., Mar 16, 2005 IP
  17. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #17
    But then all you get is inflated stats. I'd worry more about customers than spammers.
     
    T0PS3O, Mar 16, 2005 IP
  18. SEbasic

    SEbasic Peon

    Messages:
    6,317
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #18
    I don't like inflated stats.

    Makes quick stat checks difficult.
     
    SEbasic, Mar 16, 2005 IP
  19. neterslandreau

    neterslandreau Peon

    Messages:
    279
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #19
    I don't either. Because I pretty much operate on a shoestring budget and it is impossible for me to ignore my own clicks, I always create a subdomain that keeps no logs and do my developing thru that.
     
    neterslandreau, Mar 16, 2005 IP