How to setup Hotlink Protection ?

It prevents other websites from directly linking to files from your website. This means that when another website is visited, it cannot load pictures, css or javascript from your website pages. This is one of the way to control unnecessary traffic if you are getting on your website. 

For example.

HotLinking is the process to Copy Image or video Content from your website Page Through HTML Coding and other users can live their websites using your content on their website. Content of your website will be live on others website with your server bandwidth. 

For enabling the hotlink protection on your website you have to add the Below given Code in your .htaccess 

RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://domain.com$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

For example if your website uses https://yourdomain.com as its URL and you want to protect .jpg and .jpeg images, you need to add the following lines in the .htaccess file

  • 0 Users Found This Useful
Was this answer helpful?