Hotlinking (also called inline linking) occurs when someone displays an image or file from your website on their website by directly linking to your file URL. This uses your bandwidth and server resources without your permission.
<!-- Their website hotlinking your image -->
<img src="https://yourdomain.com/images/photo.jpg" />Prevent others from using your bandwidth allowance
Avoid overage charges from excessive bandwidth use
Reduce load on your server
Control how your images and files are used
Allowed Domains:
yourdomain.com, www.yourdomain.comProtected Extensions:
jpg, jpeg, gif, png, bmp, pdfAllow Direct Requests:
YesAllowed Domains:
yourdomain.com, www.yourdomain.com, cdn.yourdomain.comProtected Extensions:
jpg, jpeg, gif, png, svg, mp4, pdf, zipRedirect to:
https://yourdomain.com/hotlink-warning.htmlRewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|pdf)$ - [F,NC]RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ https://yourdomain.com/hotlink-image.jpg [R,NC]RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?facebook.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?twitter.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [F,NC]To disable hotlink protection:
Or remove the hotlink protection rules from your .htaccess file.