What is Hotlinking?

Hotlinking (inline linking) is referring to displaying an image on Website B by directly linking to that image from Website A. In this case, we can assume Website A is your website while Website B is an unknown website to you.

How Hotlinking Works and How It Affects Me?
As a website owner, you may have a number of images on your website. At the same time, someone at an unknown place may feel that they would like to apply the same images (from your website) on their own website. However, instead of saving their own copies on their website, they may insert the images via direct links to yours. This way, they will be using your bandwidth for the images and this will cost you money and loss of bandwidth.

Luckily for you, there is an easy way to prevent such cheapskate practice and we will guide you through the process of hotlink-protecting your Joomla website using the 3 steps below:

Create Your Image (for hotlinking protection)
Upload Your Image Using FTP to your Joomla site
Edit .htaccess File to Enable Hotlink Protection

Step 1: Create Your Image

This step is pretty straightforward. In this example, we are going to insert Gotcha image which will appear each time when there is a hotlinking to content on our website. If you have some development knowledge you can create an entire page, or configure your website in multiple ways to prevent hotlinking.

For convenience, just use one simple image to configure the hotlinking protection on your Joomla installation. Kindly note to save your image with an .jpe extension.

In our example, we are using hotlink-protection.jpe as seen below:

Step 2: Upload Your Image to Your Joomla Site Via FTP
After creating the hotlink-protection.jpe image, you have to upload it to the correct location of your Joomla website via FTP. In this case, we are going to upload to our Joomla subfolder since we installed Joomla in a subdirectory e.g. www.ourdomain.com/joomla

Remember, the hotlink image file should be placed inside /joomla/images folder.

Step 3: Edit .Htaccess File to Enable Hotlink Protection




RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$

NOTE: Where example.com is your actual domain name and you need to change that accordingly.

Was this article helpful?
Thank you!