Africa (45) ASP.NET (435) Bugs (160) CodeRush (21) Coding4Fun (30) Corillian (19) DasBlog (114) DevDays (5) Diabetes (47) eFinance (8) Gaming (95) HttpHandler (14) HttpModule (19) INETA (8) Internationalization (35) Javascript (51) Learning .NET (37) Longhorn (9) Movies (43) Musings (258) Nant (36) NCover (10) NDC (11) NDoc (5) NUnit (42) PDC (55) Podcast (44) PowerShell (43) Programming (83) Reviews (75) Ruby (45) Speaking (152) Subversion (14) TechEd (117) Tools (296) ViewState (18) Watir (21) Web Services (416) XML (267) XmlSerializer (27) Zenzo (29)

www.flickr.com
This is a Flickr badge showing photos in a set called Zenzo. Make your own badge here.

 Friday, 03 December 2004
« GUI Front End to Chris Sells' XmlPreComp... | Main | Precompile.axd in ASP.NET 1.1 with Syste... »

Target: Referral Spam in dasBlog

I've pretty much solved the comment-Spam problem (only one person has voiced their distaste so far) but a recently perusal of my logs and older posts indicated a ridiculous amount of referral spam. 

This is when someone hits a post on your site and has changed/hacked the HTTP Referrer Header to indicate where they came from. If your blog adds this referrer to the page, as most to, you've just linked to Hot Gay Sex (not that there's anything wrong with Hot Sex between consenting adults : ) ) or whatever by their actions.

The story goes when Google comes around, they see that you've linked to them, and they get Google Juice via the Page Rank System.

Not only is this potentially offensive to my readers, it also obscures the posts and comments when they are filled with referrals.

Potential Solutions:

  • Stop printing out referrals on my pages.
    • Personally, I like to see them, and I think they provide value to the reader so they can see other places with information of interest. It also promotes cross-linking between my peer blogs.
  • Modify dasBlog to NOT add icky referrals.
    • This would be idea. However, it will likely be in version 1.7 in some way, either via James Snape's whitelist solution (I think a whitelist removes the point of referrals, and I'll greatly prefer a keyword-based black list) or some other technique.
    • I've avoided running a "private build" of dasBlog so far (as evidenced by my care in creating the CAPTCHA solution without recompiling) and I'd to continue as such
  • Clean the .xml files occasionally with a process
    • This is quick, easy, can be automated, and will work in the short term for me as I await dasBlog 1.7.

So, here was an opportunity to use the only dev stuff I have on my home machine, Visual Studio C# 2005 Express

Here's what I did. Use at your own risk, back up your /content directory, and know that this will only have to run on your "*.dayextra.xml" files from dasBlog. No error handling, no warrenty, but it worked for me. Enjoy.

Usage: TrackingFilter "c:\yourdasblogcontentdirectory"

File Attachment: TrackingFilter.zip (9 KB) (for VS.NET 2005, I don't know if it works in 2003)

WARNING: The words I put in the .config file are ; delimited and are unquestionably offensive. Not only do they include most of George Carlin's words but they also include "bloglines" and "artima" because they don't provide a value in my referral list.


ASP.NET | DasBlog | XML
Saturday, 04 December 2004 04:37:24 (Pacific Standard Time, UTC-08:00) by Scott # Comments [1] | Trackback Tracked by:
http://www.shahine.com/omar/PermaLink,guid,c20d14f7-330b-43fb-b63d-1049f591933d.... [Pingback]

© Copyright 2006 Scott Hanselman newtelligence dasBlog 1.9.6288.0
Page rendered at Thursday, 16 November 2006 23:31:20 (Pacific Standard Time, UTC-08:00)
 
  Microsoft Regional Director Program Logo   Microsoft MVP (Most Valuable Professional) Logo   XFN Friendly
Contact me: =scott.hanselman