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.


  1. Robert says:

    it seems like a never ending battle with this stuff. Can’t we all just get along and stop trying to attack sites. This just makes life harder for everyone involved. it seems we spend 1 – 2 hours a day just applying security code and patches and blah blal blah to our site.

  2. Sean says:

    Nice piece. Thanks for writing it and the one on content protection.

    Here are a few follow-on thoughts, and I apologize upfront if this sounds self promoting but hopefully our client’s strategy gives some helpful ideas to your readers.

    One of our clients, who is very similar to @qot, started using our content protection network to detect and block hotlinking and web scraping sites in real-time. However, there was an unexpected benefit. In the detection process we identified and began blocking both illegitimate and multiple “legitimate” businesses who were hotlinking to our client’s content. Our client contacted these legitimate businesses and offered to sell them access to their content/data via an API. Essentially a whole new revenue stream was generated, that had not previously existed.

    So regardless if you’re using Distil or some of methods above, the takeaway is to consider the additional revenue opportunities available to you.

  3. Daniela Ruah says:

    Awesome explanation on this topic. I like the way you presented it. It makes me think that I’m going to revive my blog site.

  4. Robert says:

    Very good stuff. Nicely explained.

    A word of caution, to anyone who wants to edit their .htaccess file. Just make sure that you do not have any stray special characters or extra punctuation in it, or it could crash your website. If you do see errors like “Internal Server Error” or “Timeout” Errors, re-check the htaccess file. Chances are very high that something is wrong in it.

    A very easy way to fix this would be to remove all the rules you have written. If you want to retain everything, yet want to be able to fix the issue without actually deleting the code, then simply use # symbol at the start of each line. # stands for comment, so it will comment out all the lines that you have used it in. So you can comment it & try again. That should fix it.

    Hope this helps someone.

  5. Sandy Sunny says:

    Hotlinking is a hassle for webmasters. It increases server load without any benefit or economical reward.

  6. Grant says:

    This worked like a charm! No more free content for scrappers! Great using the .jpe extension for the image file to avoid loops btw. Thanks a bunch!

Leave a Reply

Your email address will not be published. Required fields are marked *