Stopping the Leechers

I was looking at the traffic for some of my sites the other day and spotted a lot of bandwidth (relatively) being used by one particular site. Now that site only really serves up a script to convert RSS feeds to JavaScript files so that I can them embed news items from selected sources into some client sites.

So I looked at the web stats. for that site and discovered that nearly all the traffic was coming from a site in China. I followed a couple of the referring links and found that the pages were basically just generating page after page of potential search terms with embedded news feeds presumably to serve ads. on those pages.

That does beg the question that if they are intelligent to code those pages or that system, why aren’t they intelligent enough to simply add the scripts to their own site and serve them from there?

Now my site is hosted on a regular Linux box running Apache Web Server, so it was a fairly straightforward task to simply block all traffic from that domain name using an .htaccess file with this code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://(www\.)?baddomain\.com [NC]
RewriteRule .* - [F]

So the next day when I checked the stats., there were many thousands of Failed Referrer entries where the code was no longer being leeched by them. Job done!

But it did then appear that my site had some particular attraction to them because they then started running the scripts on a different domain! Now, my first thought was to simply amend the .htaccess file to read as follows:

RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://(www\.)?baddomain\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?anotherbadone\.com [NC]
RewriteRule .* - [F]

But I realised I could end up playing cat and mouse with them for life, so instead I have now set the .htaccess file to only allow specific referring domains access to the scripts by using this code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?gooddomain\.co\.uk [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?anothergoodone\.com [NC]
RewriteRule .* - [F]

By adding the “!”, the expression now says “if the referrer is not gooddomain, then…”. The only difficulty for me then is making sure there are matching entries for all the legitimate referrers (trickier as one of the sites has multiple domain names).

We’ll see how we get on with this.

[edited to add]

And lo and behold! The blocking is working well, especially as the Leecher in question, hosted by NetEase.com, Inc., has now started doing it with a third domain name.

Chav Tax Jollities

Every so often, I buy a ticket for the National Lottery, aka the tax on the poor and stupid.

So with my present degree of arsedness* being pretty low, I decided to register and play online. Here’s part of the confirmation e-mail I received when I signed up:

“Dear `Firstname`,

Thanks for opening a National Lottery Account and welcome to The National Lottery online service.

Your username is: `Username`. Please keep this email handy; you may find it useful to refer to if you forget your sign-in details.”

Yes, I’m sure that will come in handy… 

*the extent to which I can be arsed to do something

The Trouble with YouTube (Redux)

I have received a reply to my support query about marking comments as spam from YouTube:

“Thanks for your email. The “Mark as Spam” feature is there to help us recognize messages which are spam. If you see any comments which are spam, please click on “Mark as Spam” and the comment will be removed from the site. This helps us keep the site clean and spam free.”

Now, maybe it’s just me, but when I upload videos I allow comments but only if they’re approved by me, i.e. I get a notification of a comment, go to the video and approve or delete them or indeed mark them as Spam. In my case, the reply that “the comment will be removed” doesn’t appear to be correct. When I mark a comment as Spam, it shows as being marked that way, but as soon as I reload the video page or log out and log in again, the comment is still there awaiting approval and has to be manually deleted.

So what’s the point in marking the message as Spam, especially as they’re almost exclusively from “fire and forget” YouTube accounts? All it does is make more work for me.

The Trouble with YouTube

Well it’s all very well and good being able to easily upload videos and set various options for comments and the like, but what happens when there’s a feature you don’t understand?

Some of my videos on an alternative profile are quite popular and as a result of that a lot of people are subscribing to the video ‘channel’ which I presume is partly responsible for introducing more subscribers viral marketing stylee.

But with that comes the issue of Comment Spamming, mainly for those tacky webcam pr0n sites. Now, all comments for my videos are moderated so they don’t actually get seen until I go along and approve them or otherwise. There’s also a “Spam” link which seems to hide the content but the username is still shown, at least to me, but reloading the video page shows the full comment to me again, so I then have to delete it. So what exactly does the Spam link do? Try searching for “spam” or “comment spam” or whatever in the Help Centre and you’ll see there’s nothing at all about that.

I also had to raise a query about “Bulletins”: do they go to all your subscribers or just your friends? I’m still not entirely sure, but I suspect the latter.

Maybe they should spend some of those billions of a proper, full FAQ?