Hotlinking is the use of a linked object, often an image, from one site by a web page belonging to a second site.
Questions tagged [hotlinking]
245 questions
70
votes
7 answers
How to prevent a file from direct URL Access?
I'm using Apache and I have a sample web folder on my Local Host, like:
http://localhost/test/
Files in the test folder:
index.html
sample.jpg
.htaccess
Sample source of index.html:

夏期劇場
- 17,821
- 44
- 135
- 217
39
votes
3 answers
PHP: How can I block direct URL access to a file, but still allow it to be downloaded by logged in users?
I have a website where users should be able to log in and listen to a song (a self-created mp3). I want to make it so the logged in user can listen/download/whatever, and the file should reside on the server (not be stored in the MySQL database),…

Bing
- 3,071
- 6
- 42
- 81
30
votes
3 answers
Html
works but JS Image loading cause CORS error
I want to create picture editor in js+jquery. At the first step i ask user to give image url. But I come across problem when i try load image data inside JS (to generate base64 image uri). I get error in console: … has beeb blocked by CORS policy:…

Kamil Kiełczewski
- 85,173
- 29
- 368
- 345
27
votes
10 answers
How to protect against direct access to images?
I would like to create a web site with many images. But I would like to protect against direct access to images, e.g. direct links to images without visiting the web site.
What is the preferred way to do this? And what are the alternatives with Pros…

Jonas
- 121,568
- 97
- 310
- 388
23
votes
7 answers
How do I prevent hotlinking on Amazon S3 without using signed URLs?
Is there any way I can prevent hotlinking on Amazon S3 without using signed URLs?

MathOldTimer
- 1,311
- 3
- 13
- 22
21
votes
7 answers
How can I prevent Amazon Cloudfront from hotlinking?
I use Amazon Cloudfront to host all my site's images and videos, to serve them faster to my users which are pretty scattered across the globe. I also apply pretty aggressive forward caching to the elements hosted on Cloudfront, setting…

Donald Jenkins
- 3,485
- 8
- 33
- 35
18
votes
4 answers
Google Storage or Amazon S3 or Google App Engine BlobStore
I am going to build a site using Google App Engine. My public site contains thousands of pictures. I want to store these pictures in the Cloud: Google Storage or Amazon S3 or Google App Engine BlobStore. The problem is image hotlinking.
As for…

DocWiki
- 3,488
- 10
- 39
- 49
16
votes
4 answers
How to download hotlink protected images?
I want to download images from other websites that are hotlink protected. I don't want to link those images to my website. I just wanted to download them.

Amit
- 33,847
- 91
- 226
- 299
15
votes
6 answers
Is there a version of jQuery somewhere that I can hotlink to without hosting the file?
Just wondering if there's a website out there that allows you to hotlink to the latest version of jquery. Does Google code allow you, or does jQuery.com itself?
What I'm not looking for is a site that just happens to have jQuery that I can pinch. I…

Eric
- 95,302
- 53
- 242
- 374
13
votes
2 answers
Prevent hotlinking of Amazon S3 files?
I'd like to allow anyone to play a video located in my s3 on my site as the src on a

tim peterson
- 23,653
- 59
- 177
- 299
12
votes
2 answers
Allow/deny image hotlinking with .htaccess
So I've got this in my site .htaccess file to prevent hotlinking of images, JS and CSS from all other domains.
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain\.com [NC]
RewriteRule \.(gif|jpe?g|js|css)$ -…

markratledge
- 17,322
- 12
- 60
- 106
11
votes
4 answers
Prevent image hotlinking in Google Image Search
Just recently, Google has introduced a new interface of their Image Search. From January 25 2013 on, full size images are shown directly inside Google, without sending visitors to the source site. I came across a site, that apparently has developed…

Simon Steinberger
- 6,605
- 5
- 55
- 97
11
votes
1 answer
How To Prevent File HotLink from Internet Download Manager IDM
Am having some issue fixing media file hotlink or download using IDM, am working on serving a video file using PHP and it works fine, but I notice that IDM installed on my computer was able to add download box to the video I am playing using…

femotizo
- 1,135
- 2
- 12
- 18
9
votes
1 answer
.htaccess - Check Referer Matches Host Without Hard Coding?
I would like to do the typical thing where you make sure a referrer header matches your host, using htaccess. However I would like to do this without hard coding the domain name, so the htaccess code can easily be reused across many many sites.
I…

omghai_8782
- 468
- 4
- 11
8
votes
5 answers
Performance: Absolute vs. Relative URLs
What's faster? Hot linking (inline linking) to an absolute URI or hosting the resource yourself and using a relative URI?
In his tutorial on how to style HTML5 elements in Internet Explorer, Remy Sharp states that hot linking causes an "extra HTTP…

ma11hew28
- 121,420
- 116
- 450
- 651