Hot linking is a topic that has been discussed in this blog and this is a situation which no webmaster would like to happen with their website. Hot linking clearly eats up the bandwidth of your website and thereby caused negative impact on the overall search engine performance of the website. Hot linking usually happens when large files are hosted on your website and other small websites want to take advantage of this without using their own bandwidth.
Hot linking can be disabled or prevented with the help of a .htacess file. By writing few simple lines of codes on the .htacess files you can prevent the unauthorized linking of the files from your website. You just need to upload the .htacess to the root of your website once your finish writing the code. If you want to prevent the hot linking of JPG, GIF and PNG files from your website, then the htacess syntax can be written as follows.

RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?yourwebsite.com/.*$ [NC]
RewriteRule .(jpg|gif|png)$ – [F]

By writing this code, you have prevented other sites from accessing your files. The only site that has access to your files is the website mentioned in the .htaccess file, i.e yourwebsite.com.

Related posts:

  1. Hot Linking and How it Affects Your Website
  2. Control the Search Engine Spiders with Robots.txt
  3. 10 Important On Page Optimization Factors
  4. Some Useful On Page Optimzation Factors that Matters Most