Shakugan no Shana

Well it's official ladies and gents, now that it's the 1st of June this site's bandwidth quota has been reset and is now back in business! I've gone ahead and signed up for a higher plan with my webhost that provides four times the bandwidth which is more than I need now, but allows for future growth.

I could probably have left it at that, but I've also been taking a closer look at my server logs to determine where all my bandwidth has been going. I've had websites for over ten years but this is the first time I've had a problem with traffic (says a lot really!) and I found it hard to believe a simple blog like this could chew through over 28 GiB in a month!

To my surprise, over 15GiB of bandwidth (yes, really!) was used in the month ending May this year on larger versons of the image shown above, and the one below, both of which I just put here in passing in posts back in 2007 (Kmahjongg and gingerbread at 0206am, Thinning universal binaries with ditto) because of my aversion to dry posts without images:

Nodoka and friends from Negima festive wallpaper

Clearly the problem is hotlinking! As if this act isn't inconsiderate enough, many people used the image for backgrounds on their social networking pages which got refreshed hundreds of times of day, others put them on gallery pages and didn't even bother creating a thumbnail for people to click on first. I've blocked these sites, and already I'm seeing vastly reduced data usage. I blame myself for not picking this up sooner.

On a traditional website a simple, blanket solution would be merely inserting code similar to this in your .htaccess file to return an access denied error if the referring address wasn't your own. An alternative would be to simply replace the hotlinked image with a smaller one, usually with a stern warning attached.

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+.)?mysite.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*.(jpe?g|gif|bmp|png)$ - [F]

Right off the bat, if you're someone who knows about RSS feeds and the like, you can see a problem with this. Unfortunately if you implement this fix, people who read your blog posts using an external blog aggregator such as Google Reader or Bloglines will be denied access to images in your posts! I'd rather not instigate a whitelist because I don't know what software people are using to read my posts and I don't want to give preferential treatment to some over others. It goes against the free nature of the internet, and I inhereted my late mum's hippy freedom beliefs ^_^.

I've also decided not to only include summaries in my RSS feeds instead of the entire post to save bandwidth. I can't stand it when others do it, and I won't do it. That said, I'm giving some thought to filtering out anime and study related posts from the main RSS feed once I've imported those sites into this blog, and allowing others to subscribe to them if they want using category feeds.

As I said at the top, I've never had a popular site before with material on it people want! It's been a learning experience.