How to Stop Image Hotlinking by RSS Content Scrapers

How can you stop image hotlinking by RSS content scraping websites which republished your full-text content with images? Image hotlinking is a big problem for Webmasters because these images on the scrapers website actually drain bandwidth from your hosting plan, and makes it seem like it’s their original content. Fortunately, bloggers can easily block images on the sites.

What is Image Hotlinking?

It basically means the website which copied your content with images, downloads these images from your server (instead of uploading to their own server) when someone visits that web page. So when their site gets traffic, not only is your republished content getting exposure as their own content, the images also are loaded from your own hosting server.

If you have limited bandwidth plan, such hot-linked images can very quickly finish hosting bandwidth – not only increasing your hosting bill but also sometimes leading to your site going off-line as your hosting service provider limits your bandwidth till you pay!

stop image theft

How We Stop Image Hotlinking on QOT?

A lot of RSS content scraping auto blogs republish our full-text content, and this stopping content theft and plagiarism is very difficult to control and possibly leads to Google penalties and duplicate content issues, and in fact, these articles might rank higher than your own content.

See what happens when some content scraping blogs try to republish our full-text RSS feed. If we block image hotlinking for their domain name, our custom image hotlinking banner replaces all hot linked images on their site.

stop image hotlinking

In addition, we also prefer to add a feed Copyright notice and get free backlinks from the scraped content.

Stop Image Hotlinking

While there are many ways in which your .htaccess file can block images totally from displaying on any other site except your own site, we don’t prefer it because it will also block images from many RSS aggregators, feed readers, email subscriptions, and many other valid use options. So we prefer to block hot-linked images only from websites that are scraping our content.

This is the code that we add to the .htaccess file. [Note the .htaccess file extension – it is basically a text file, and does not have a.txt extension]

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(www.)?*)*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www.)?*)*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www.)?*)*$ [NC]
RewriteRule .(jpeg|JPEG|jpe|JPE|jpg|JPG|gif|GIF|png|PNG)$ hotlink.jpe [L]

Note that we upload this htaccess file into the wp-content>uploads folder, which stores all images which have been uploaded into the WordPress posts. So this htaccess file will block all images from this folder from displaying on the domain names that you have blocked. This will not block images hosted elsewhere on your server. So in this example, this file is set to block images on 3 bad domain names and their subpages.

Be warned that the .htaccess file is a very powerful file and if used incorrectly can make your site go offline, so be sure to test its function on live blogs and see that it is stopping image hotlinking as expected. If anything goes wrong, simply delete the .htaccess file in the upload folder. Also, note that this is different from the htaccess file in your hosting root folder.

Image Hotlinking Banner

If you carefully note the code, it also has an image titled hotlink.jpe (you can name it whatever you want) – this image has a JPE extension, which works like a JPG extension actually, and has been purposefully misnamed so that it is not blocked by the .htaccess file. It is uploaded in the same folder, and the purpose of this file is to replace the file on the content scrapers website with this image. You can make this image a display whatever you like.

What are the characteristics of a good image hotlinking banner –

  • Colour – You will notice that the hotlink.jpe image we use is that large green image in the screenshot above. The purpose of this image is to highlight that the image has been blocked purposefully by the site owner, has been used without permission, so it is a good idea to use a bright color so that it is very visible on the page.
  • File size – It should be optimized to a very small file size as it will be downloaded across the web as many times as the hot-linked images are loaded up (you don’t want your hotlinking image banner to increase bandwidth costs).
  • Text message – It is a good idea to post a message to which domain name the image actually belongs to – for example, we tell visitors who see these images to visit QOT.CO – which is a short URL that redirects to our main domain name (QOT readers can preferably use this URL to reach our site on their mobile browsers). We also chose the short domain name here as it is easier to put on small size images.
  • Image size – Note that the image resizes to whatever image dimensions have been specified on the web page, so large images get replaced by large hotlinking banners. Use the text on your image in such a way that it is readable even in small and large sizes as the image resizes and gets pixelated and blurred.

Image hotlinking block not working

Common reasons why your hotlinking is not getting blocked could be – wrong use of htaccess file code, or wrong placement of htaccess file.  As auto bloggers continue to get smarter (to avoid things advised in this tutorial), sometimes they actually do upload images on their own server. In those cases, this code will not work as the images are not on your server, and it is not hotlinking. To check this, view source code to see the image URL or open image in a new tab, and you will see that it is not hosting on your server.

Find content scrapers

How to find which blogs are scraping content? Simply post an article. After an hour search for the exact title of your post (within quotes) in Google search, and all the sites which have used the exact title will be displayed. You can check which sites are simply aggregating headlines, and which are republishing your full-text RSS feed.

Try out this quick image hotlinking tutorial on your website. Share your hotlinking image in the comments.

Share with friends

About the Author: P Chandra is editor of QOT, one of India's earliest tech bloggers since 2004. A tech enthusiast with expertise in coding, WordPress, web tools, SEO and DIY hacks.