Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How can I prevent content hotlinking?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How can I prevent content hotlinking?

96mb96mb Member
edited February 2012 in Help

I have just noticed today (purely by accident as well) that there are some website who are simply leeching the contents of 96MB.com and post them as theirs. I am just wondering if there is a good way to prevent such things from happening. Although I do encourage people to point out the mistakes and rooms for improvements for 96MB.com, simply copying the contents and put affiliated links there is something I do not really want to see.

Thanks a lot!

Comments

  • NarutoNaruto Member
    edited February 2012

    Cloudflare has this feature but I Googled "hotlink htaccess" and found these links for you.

    http://www.htaccesstools.com/hotlink-protection/

    http://altlab.com/htaccess_tutorial.html

  • AdamAdam Member
    edited February 2012

    If they're just copying and pasting, there really aren't any great methods other than only posting images (instead of text). But SEO will be down the drain with that.

    If they're linking to your images, then you can easily use a location based filter in Nginx

    location /images/ {
         valid_referers none blocked mysite.com *.mysite.com;
         if ($invalid_referer) {
            return   403;
        }
    }
    
    The above is a directory based block (you can easily block via file type though)
  • 96mb96mb Member
    edited February 2012

    @dotvps: Thanks for the suggestion, I just found it might be a little unfair to block one whole country because some people are doing things in that country
    @Naruto: One of the issues using this feature in Cloudflare is that whoever that is viewing the article from, say, Google Reader, won;t be able to see any of the pictures

  • @Adam: I think you have provided a great solution, thanks a lot!

    Thanked by 1DeletedUser
Sign In or Register to comment.