Home > BlogTech > Hotlink Protection

Hotlink Protection

August 14th, 2007

To all visitors:

Due to a warning from my web host, I have been forced to enable Hotlink Protection. The last time I did this, a lot of people complained of images not showing up. If you experience such image outages, please let me know in the comments of this post. Thanks!

Update: To those of you building your blogs over time, a little word of warning: avoid piling up too many entries with images in any one category. Why? Well, I just found out.

As I mentioned above, I have been taking heat from my web host. First it was for an “abusive script,” which is to say that spammers were hammering my comment script like there was no tomorrow. Even though no spam ever gets through, they were pounding the damn thing like a sunavabitch, tying up the shared hosting server’s CPU too much. I fixed that at least temporarily, with more fixes to come.

But that’s not what I’m talking about in this note. After the cgi script was called out, and after I fixed it, my web host started complaining about my site getting “too many hits.” They pointed out that my site was getting something like 80,000 hits every day. That seemed strange, as I only get a few thousand visits every day–but after checking, I saw the problem. As I said above, it was in the categories.

You see, I had a few categories that were image-rich, like “Focus on Japan,” “Photo Stories,” and “Birdwatching in Japan.” Each category had several hundred posts, most of which had multiple images. And I noticed that these topics were getting the most number of hits of almost any file on my site–over the past two weeks, “Focus on Japan” got 3230 visits, “Photo Stories” got 1826, and “Birdwatching in Japan” got 694.

So what? Well, each time one of those category archives got hit, every single image had to be displayed–sometimes each loading of a page put five or six hundred images, each image representing a “hit” on my site. And a lot of those visits, probably most of those visits, were coming from the image search engine pages.

Each category archive page had accumulated hundreds of different topics, many hundreds of differently-named images; that variety meant that each such page would get more attention from the search engines. People hunting for one image would get the archive page and see hundreds.

As a result, a few thousand visits started generating nearly a hundred thousand hits, and I got into trouble. To fix it, I simply got rid of the “Photo Stories” and “Birdwatching in Japan” categories, figuring that I don’t need them so much–few people if any ever comment on them, so I figure they’re just drawing image searches. To hell with that! “Focus on Japan,” however, I wanted to keep. To solve the problem with that one, I broke the category up into six categories, one for each year since 2003 and one miscellaneous category (see them now in the category list at right). That got rid of the troublemaking plain-vanilla “Focus on Japan” category, created several new categories not yet indexed by the search engines, and kept the number of hits per page down to a lot fewer than before.

So my advice: if you use images in many of your posts, watch how they pile up in the categories, lest you suffer the same fate I did.

Categories: BlogTech Tags: by
  1. August 14th, 2007 at 12:12 | #1

    Have you ever considered hosting your images on a separate server, Luis? I do that with mine, and have never had much problem at all. (Of course, these days I rarely have the opportunity for much blogging, so my site gets far less traffic that what you describe.)

    I host my images at smugmug.com and link to the images from there. The storage is unlimited and the bandwidth allocations are pretty generous, so that might be one thing to consider. If you are interested, tell them that QX3HpXVETUGvw sent you. :-)

  2. Luis
    August 14th, 2007 at 14:12 | #2

    Sako:

    Good idea, but I have literally thousands of photos taking up tons of space, and would have to re-edit more than a thousand blog entries by hand to re-direct the image links to new addresses… not really feasible in my case. But thanks.

  3. August 17th, 2007 at 23:28 | #3

    Relocating all those images would be a major hassle, I agree. I had only been thinking of it as something you might consider using from now on, but that wouldn’t do much to alleviate the immediate problem, would it?

    (In any case, would you mind adding the http part to the link above? Right now, it points to “www.blogd.com/archives/www.smugmug.com/?referrer=QX3HpXVETUGvw”, which would not be of much use to any of your visitors who might like to give smugmug a try. The referrer link saves them [and me] a bit of money if they sign up, but feel free to remove that information if you feel that it is inappropriate. Thanks!)

Comments are closed.