How do you prevent people from hotlinking photos from your typepad blog?
April 17, 2007 10:26 AM   Subscribe

How do you prevent people from hotlinking photos from your typepad blog?

I have original content (photos) on my typepad blog (the intermediate account, not the most expensive one: should I upgrade?): they are getting hotlinked up to the wazoo by a bunch for forums. How do I avoid that? I've tried to rename some files in the "edit post" HTML window but I just deleted the images and I had to reload them. Obviously, I am technically not that savvy, at least for blogs. Thanks.
posted by PenguinBukkake to Technology (18 answers total)
 
Response by poster: I guess I should add that they are big files, I don't want to have bandwidth problems with typepad
posted by PenguinBukkake at 10:29 AM on April 17, 2007


You should get in touch with SixApart. They might be able to set something in the .htaccess file to prevent your stuff being served up when requested from a server that isn't hosting the rest of your site.
posted by chunking express at 10:36 AM on April 17, 2007


Can you host them on a site like Flickr instead?
posted by sbutler at 10:54 AM on April 17, 2007


This is the .htaccess file I have in my image directory:

RewriteEngine on

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?denbeste.nu/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?denbeste.nu [NC]
RewriteCond %{HTTP_REFERER} !^http://regulus.denbeste.nu/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://regulus.denbeste.nu [NC]
RewriteCond %{HTTP_REFERER} !^http://70.90.130.45 [NC]
RewriteCond %{HTTP_REFERER} !^http://70.90.130.45/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://192.168.1.1 [NC]
RewriteCond %{HTTP_REFERER} !^http://192.168.1.1/.*$ [NC]
RewriteRule \.(gif|jpg|png|swf)$ http://denbeste.nu/common/myspace.gif [R,L]


The "myspace.gif" file is huge (in pixels) and obnoxious; it blinks between blue and red. I think of it as deterrence; when people link to it, they soon change their minds and unlink again.

This only works if the server has "mod_rewrite" installed and certain permissions enabled, something you can't do without admin privilege. However, on many servers they do have this turned on, and this would work if placed in the directory where the image files are kept.

What this file says is that refers from my own domain, or refers from the literal IP, are permitted to access my image files. (And the first line says that if there's no referer at all, that's also OK.) Everyone else gets the deterrence GIF.
posted by Steven C. Den Beste at 11:16 AM on April 17, 2007


By the way, line break placement is critical, and it won't work if there are extra ones. Looks like the font is huge there and it's wrapping. Here's the same thing, smaller (I hope) so that it doesn't wrap:

RewriteEngine on

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?denbeste.nu/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?denbeste.nu [NC]
RewriteCond %{HTTP_REFERER} !^http://regulus.denbeste.nu/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://regulus.denbeste.nu [NC]
RewriteCond %{HTTP_REFERER} !^http://70.90.130.45 [NC]
RewriteCond %{HTTP_REFERER} !^http://70.90.130.45/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://192.168.1.1 [NC]
RewriteCond %{HTTP_REFERER} !^http://192.168.1.1/.*$ [NC]
RewriteRule \.(gif|jpg|png|swf)$ http://denbeste.nu/common/myspace.gif [R,L]

posted by Steven C. Den Beste at 11:20 AM on April 17, 2007


Steven C. Den Beste, if I'm not mistaken, I don't think one can edit the htaccess file on a TypePad blog since it's hosted by them.
posted by KevinSkomsvold at 12:17 PM on April 17, 2007


There's a master .htaccess file in a central directory, and you can't change that one. But depending on how the system is configured, it's also possible to put a .htaccess file in individual directories to protect their contents. All that would require is FTP, or some other file transfer ability.
posted by Steven C. Den Beste at 12:26 PM on April 17, 2007


Ah! I stand corrected. Thanks.

PenguinBukkake, have you considered photobucket.com as a interim solution? They do not allow hot-linking and their free account is pretty generous.
posted by KevinSkomsvold at 12:31 PM on April 17, 2007


Swap pictures? (get some gay porn or something).

bluestate had this problem and substituted this picture for this one
posted by MonkeySaltedNuts at 1:49 PM on April 17, 2007


Well, back in my day, we'd just goatse 'em.
posted by Mr. Gunn at 3:10 PM on April 17, 2007 [1 favorite]


I recently asked typepad customer support this same question and if there is any way to edit the .htacess file. Here is the completely useless email response I received:
TypePad Customer Support has responded to your ticket 'Hotlinking'. This email notification has been automatically sent by TypePad.

Thanks for the note, but at this time, to use a .htaccess
file with TypePad.

If you are concerned that your images may be used
inappropriately, you may want to watermark your images (and
upload them to your blog that way.

Please let us know if there is anything else we can do for
you.

Thanks,
Kymberlie
I assume they meant it's "not possible" to use a .htacess file. I like typepad a lot but due to their lack of support for pagination and inability to prevent hotlinking, I'm considering moving to a different system
posted by Staggering Jack at 3:24 PM on April 17, 2007


Staggering Jack, With web hosting as cheap as it is, you could actually pay about the same as TypePad and get more. For example, Dreamhost has a package that starts at $9.95 and has one-click-install for Wordpress blogs. I've used DH since 1999. They went through a period of growing pains, but since the massive server upgrade - hardly a blip. Plus, you get your own domain name (free when you sign-up) and all the goodies that come with it (email, photo galleries, etc.). It's something to think about.
posted by Gerard Sorme at 3:37 PM on April 17, 2007


For the record, my blog (robosexual) is on Typepad too, and I was going about 800% over my bandwidth every month from the mp3s I serve up, but I've never heard a peep from them. In fact, even now I get as many hits but it says I'm only doing about like 10mb of transfers a month, in addition to only using 0mb of my 500 allotted, when in fact I'd say I'm using 200% of my space and I know more than 2 people are downloading songs each month.

My point is, their bandwidth monitoring (and space too) either sucks or completely doesn't exist, so I wouldn't worry about it.
posted by BlackLeotardFront at 8:29 PM on April 17, 2007


You could try using ImgRed links.
posted by staggernation at 9:02 PM on April 17, 2007


PenguinBukkake, have you considered photobucket.com as a interim solution? They do not allow hot-linking and their free account is pretty generous.

Umm, if Photobucket doesn't allow hotlinking, how will PenguinBukkake display the photos on his/her blog?
posted by antifuse at 5:35 AM on April 18, 2007


And ImgRed will prevent your image from being hotlinked from *your* site, but it won't prevent hotlinking in general. Do you want people to not use your images at all? Or are you happy as long as they're not leeching up your TypePad bandwidth?
posted by antifuse at 5:48 AM on April 18, 2007


Hi, I work with the TypePad team and if you file a help ticket, we'll definitely note that people are hotlinking to your image and not bill you for any overage. Staggering Jack, sorry you didn't find that email response useful -- most people that ask the .htaccess question are concerned about image reuse, not bandwidth, and that may be what Kymberlie was anticipating.

If either of you need a hand, feel free to drop me a line at anil@sixapart.com, though as I mentioned, filing a help ticket is pretty quick and easy, and we won't hold someone's hotlinking against you anyway.

Hope that helps!
posted by anildash at 9:26 AM on April 19, 2007


Hi Anil - thanks for the response and letting us know about Six Apart's policy regarding bandwidth usage due to hotlinking.

Just to clarify, I called the response I received useless not because of the confusing grammar (which is not a biggie as I make mistakes like that all the time) but because the watermarking suggestion didn't answer the main question I asked - which was "how do I prevent the hotlinking of images in my typepad blogs and photo albums?"

Anyway, outside of the hotlinking and lack of pagination issues, I really like typepad and would heartily recommend it to anyone who doesn't care about those things.
posted by Staggering Jack at 10:20 AM on April 19, 2007


« Older Day of Wedding Coordinator   |   easily browsable pictures of houses Newer »
This thread is closed to new comments.