What Is Hot Linking?


Hot linking is the practice of linking directly to content on another website. There are cases where this is OK and in these cases it is known to the website or content owner. What about if someone links to an image on your website and puts it in their content. Imagine also that this other website get a lot of traffic. Your web server would also serve up images to this traffic. In this case the would be a lot of traffic to your server and you would be paying for this bandwidth yet the other website is getting the benefit or revenue dollars.

There is a Linux command called Wget. The purpose of this command is to download the content of a website. Here again you are paying for this bandwidth or usage without any benefit. Linux runs the operating system on web servers. Malicious bots can use Wget to download websites.

These are all uses of your website that you probably do not welcome and in some cases can be a substantial portion of the cost of maintaining your website. Web hosts charge more for greater bandwidth usage and who wants their images stolen anyway. You can monitor this situation by watching your access logs and web stats.

The best solution to this I know of is use a content management system such as Drupal. If you can't do that the next thing is use a specially crafted htaccess file.

To make one, open notepad and add the following: (change the yourwebsite.com to your actual website domain)
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^Wget [OR]
RewriteRule ^.* -[F,L]
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http(s)?://(www\.)?yourwebsite.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]

Save this as htaccess.txt and upload it to your web server and rename it .htaccess and yes it begins with a period.

First make sure your ftp

First make sure your ftp software is set up to show hidden files. It will be in the public_html directory and the period before the h is required and the h is in lower case. htaccess files are often hidden on the server. Next if you already have one download it and copy it as a backup. Open it in a text editor such as notepad. If you do not already have one open up notepad and save it as . htaccess



  • 6:06 PM 19 December 2014
  • dashaver.com

Home   |   Top   |   Bottom   |   Back one page