Questions tagged [hotlinking]

Hotlinking is practice of displaying digital assets (such as: image, video, sound or other files) into a website by linking it from another site.

Hotlinking is considered poor netiquette because this practices will consume another site's resources for your own benefit. That's why popular web server has a features to prevent hotlinking, for example:

49 questions
1
vote
0 answers

disable direct file access on lighttpd

I'll be fast: Is there a way to block direct file access to files/images on my /var/www? So for example: If I am loading the page example.com/info.php that contains the image hello.jpg, can I block access to example.com/images/hello.jpg but at the…
john smith
  • 111
  • 2
1
vote
0 answers

nginx Anti-HotLinking configuration

I was wonder with nginx can I: Check if content-type == "image/x-jpeg" || content-type == "image/png" || content-type == "image/gif" If true && referrer != "mysite.com" && referrer != "": Return a 404 result or an image of my choice. Update: This is…
unixman83
  • 1,912
  • 8
  • 25
  • 33
1
vote
0 answers

Hotlink Protection in Nginx working too well in Firefox

I use hotlink protection in Nginx and it is working very well! For some reason it is not allowing visitors to my site using Firefox to see any images. For visitors using IE, Chrome, Safari, and Opera, it works just fine: the images show up on my…
Adergaard
  • 11
  • 1
1
vote
1 answer

IIS 7 URL Rewriting Rule for images not referred by the website itself

New to URL rewriting with IIS 7. I need to redirect to another page for images not referred by the website itself. For example is someone enters "www.somesite.com/images/image001.jpg" into their browser it'll redirect the user to…
Patriotec
1
vote
2 answers

Trouble in Nginx hotlink protection

I am trying to implement image hotlink protection problem in nginx and I need help. I have a huge issue of my site's images being submitted to social networks like StumbleUpon with a direct link like http://example.com/xxxxx.jpg Which sometimes gets…
Ayaz Malik
  • 13
  • 1
  • 5
1
vote
2 answers

Are there any drawbacks to disabling hotlinking using .htaccess?

I've been seeing a lot of requests for images hosted on my server from other websites. Rather than allow this to carry on, I'm considering using mod_rewrite and .htaccess to prevent this using something like RewriteEngine on RewriteCond…
chrisbunney
  • 463
  • 2
  • 9
  • 20
1
vote
1 answer

Add a subdomain as an exception in hotlinking

I used this code in my .htaccess file and it is working great to prevent hotlinking: RewriteEngine On RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} !^([^@]*)@@https?://\1/.* RewriteRule \.(gif|jpg|jpeg|png|tif|pdf|wav|wmv|wma|avi|mov|mp4|m4v|mp3|zip?)$…
jeff
  • 11
  • 1
1
vote
1 answer

Blocking image hotlinking on nginx running Ghost also breaks images on valid domain

I'm running Ghost on nginx 1.14.0 and Ubuntu 18.04. I am trying block image hotlinking by external sites. I've added the recommended code from this post (starts with location ~* .(gif|png|jpe?g)$) to prevent image hotlinking. Here is my site config…
1
vote
0 answers

Reverse proxy server hotlinking problems

I got the next problem: Have front-end proxy server, that points to my back-end server. Someone is steeling bandwith true my images so I want to block this from happening. I use a proxy.conf file that goes like this: server { listen 80; …
fufu
  • 11
  • 1
0
votes
1 answer

Hotlinking prevention returns 404 error NGINX

Can somebody tell me why this snippet return 404 when I'm trying to access images directly or from the original site (by link). location ~* \.(ico|jpeg)$ { valid_referers none blocked example.com *.example.com; if…
Andrew
  • 105
  • 1
0
votes
0 answers

Hotlink prevention without relying on referer?

Is there a way to stop the hotlinking of images without relying on referers? I searched for hours and all seem to do the same, problem is i must allow empty referers and when i access the site hotlinking (incognito) i still see the images most…
Michael Rogers
  • 60
  • 1
  • 3
  • 15
0
votes
1 answer

NGINX deny access to folder via addres bar but allow access from script or HTML

Is it possible to do this thing? I'm trying to deny all and allow localhost in /location in nginx config but this does not work. This is struct my files: index.php templates/__NEW/ (here are files like index.html) If user write in address bar…
furyxpl
  • 9
  • 1
0
votes
1 answer

Prevent hotlinking on Nginx

I'm trying to protect my images from hotlinking. My first approach was this: location ~* \.(png|jpg)$ { valid_referers none blocked server_names; if ($invalid_referer) { return 403; } } The problem here is the none tag, because…
Nepo Znat
  • 249
  • 3
  • 8
0
votes
3 answers

nginx hotlinking prevention with cloudflare

I want to prevent hotlingking in my site. However I also have cloudflare to serve my site. I don't want to use cloudflare hotlinking protection feature as it cannot exclude external domain that I allowed image linking (as well as redirect images to…
dev-jim
  • 283
  • 1
  • 2
  • 8
0
votes
1 answer

Hotlink protection with SHA-256

I'm using hotlink protection in a nginx server with set_misc_nginx_module using sha-1,I'd like to change this to sha-256, My current settings are this: root /var/www/streamboat.tv; set $secret "secret"; location ~ ^/live/.+\.m3u8$ { set_sha1…
Nexdevs
  • 3
  • 1