Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

How to stop media hijacking

4:43 pm on Apr 9, 2008 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 21, 2001
posts: 1281
votes: 0

I think my site videos are being hijacked and shown within other sites (probably MFA sites).

Why I think my site videos are being hijacked
- The videos are .wmv clips embedded in html pages,
- Stats for the .wmv files show view numbers from 6000-10,000 per month,
- while stats for the html pages (with the embedded videos) show view numbers from 400 to 600 per month,
- Thats a very big difference!
- An ordinary human site visitor would not be able to view a video without navigating to the html page that embeds it.

Does my assumption seem correct?

How can I stop media hijacking?
I have heard there are .htaccess commands that will ban access to a file if it is requested on its own (i.e. without the html file). I have heard of this technique to prevent others using your images (and hosting), but I am not familiar with the technique. Can any one tell me how to do this?

2:12 am on May 31, 2008 (gmt 0)

New User

10+ Year Member

joined:Apr 14, 2006
votes: 0

You can prevent hot linking to your videos by adding this code to your htaccess file.

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

Change mydomain.com to your domain.

5:33 am on May 31, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 27, 2001
votes: 0

Here's how I would code it after a little bit of modification.

RewriteEngine on
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^https?://(www\.)?mydomain\.com/ [NC]
RewriteRule \.wmv$ - [F]

This won't block user-agents with blank referrer headers but it will cut down on the number of unauthorized downloads from hotlinks.

Based on the number of downloads you report, it's possible that your videos are being indexed by media bots. Maybe a robots.txt exclusion is in order for your video files. Also, you should compare the server headers for the html files and the wmv files. It's possible that browsers are caching the html files but are not caching the wmv files. If so, this can be easily fixed.

With a simple modification to the above .htaccess code, you could easily create a short promotional wmv clip and redirect hotlinkers to it. This could include free advertising for your site or info to direct the visitor on where to access the videos legitimately.


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members