0

I have lots of videos on my website, I am curious to know what websites are hotlinking to it.

I am using cpanel with awstats, I have google analytics too. The server is running Apache.

Joe
  • 101
  • 1

1 Answers1

0

Actually you can check Referer header.

If you want block all requests outside of your domain. Here is example for Apache server.

But this technique has 2 disadvantages:

  1. Very-very easy to send faked Referer header
  2. Some browsers in very rear case may not send Referer header at all

Most common way to prevent content from cross-linking is generate dynamic temporary links with limited session time.

Daniel
  • 78
  • 4
  • How to check referer header? – Joe Jan 08 '18 at 12:24
  • I'm not a cpanel expert, but as I know cpanel has AWStats statistics. You can check referrers there (may be should be configured to see referers). In general referrer stored in apache access_log. So you can check Raw Access Logs too. – Daniel Jan 08 '18 at 13:01
  • the raw access logs is a mess, I cant find anything in it, Its a huge file with lots of information, I dont know how to find http refers in it – Joe Jan 08 '18 at 13:50
  • Yep. It's not easy task and that's exactly a reason to use AWStats. – Daniel Jan 08 '18 at 16:03
  • I can explain the format of access_log, may be it helps. The format is very simple : one line per request. Each line has fields separated by spaces, Field after time is a request URI. In this field you should see URL of your video. And after that two number and after it Referer. So you can search for your video name on whole file and look to foregin url near it skipping all urls from your domain. I do it very easy with grep command in linux environment. Hope your success – Daniel Jan 08 '18 at 16:18
  • there are about 200,000 lines in that log for January, It takes my whole life If I want to do that manually and look at what URL is near my video. – Joe Jan 08 '18 at 20:01
  • If you want send me it in some way I can extract all foreign urls for you in half of a hour. You know, if you wanna work with some 'big' information (like a site access logs) you should have tools for it. My be try googling for 'apache log parser for windows' . Now you know where 'hotlinking' stored. Good luck – Daniel Jan 09 '18 at 11:53
  • Why don't you use Apache Log Viewer for that? You can filter whatever you like in seconds. – WendiT Jun 07 '18 at 09:44