Today the topic is on about 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.
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 hotlinked 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!
@ So how do we stop image hotlinking from our website?
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 tries to republish our full-text RSS feed. If we block image hotlinking for their domain name, our custom image hotlinking banner replaces all hotlinked images on their site.
@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 hotlinked images only from websites which are scraping our content.
This is the code which 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\.)?bad-domain\.com(/.*)*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?bad-domain2\.net(/.*)*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?bad-domain3\.com(/.*)*$ [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 sub pages.
Be warned that the .htaccess file is a very powerful file and if used incorrectly can make your site go off-line, 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 manner -
- @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 colour so that its very visible on the page.
- @File size – It should be optimised to a very small file size as it will be downloaded across the web as many times as the hotlinked 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 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 one 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.