1

How do I protect videos on my server from being downloaded or hotlinked on a different site but accessible on/by one website only. I'm open to utilizing any integration either via .HTACCESS or CORS

  1. For example, I want a website on one server to access videos hosted on a different server.
  2. Any attempts to download the videos by a user be blocked.
  3. Any attempts to hotlink the videos on a different website other than the one stated above 1 be blocked.
  4. If possible but not necessary; redirect anyone trying to do (a) or (b) to either the homepage of my website or show a static (I'll use a funny one of cos) image/gif

The videos in question are in MP4 format.

1

Forget point 2. You can't stop a user that can watch a video from downloading it - because watching implies downloading.

What you can do is to check referer. This will provide mild security, effectively stopping anyone from embedding your content in their web page. It will not stop any attackers.

An more advanced version, that is marginally more effective, is to use some kind of authentication to validate the origin; this may for instance be by signing the URL with a HMAC or similar. But it will not stop someone from copying your video.

So in short, I would probably implement referer checking. That will stop embedding in other sites, which would be my big concern - as this would cost me bandwidth. It's trivial to implement, and has almost no overhead, except having to maintain a list of allowed sites.

2
  • there are protection schemes for preventing downloading... (making it very difficult, anyway...) I believe Silverlight, for instance, offers protection: download.microsoft.com/download/2/E/F/… – pcalkins Apr 23 '20 at 18:54
  • 2
    Sure, there's schemes available that try to stop this. But DRM is fundamentally broken. It's a bigger hassle to paying customers than pirates. – vidarlo Apr 23 '20 at 18:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.