2 ways to Prevent Image Hotlinking in WordPress

2 ways to Prevent Image Hotlinking in WordPress

How to Prevent Image Hotlinking in WordPress ??

Are you facing Image Hotlinking issue with your site?? This article will give you a best solutions for preventing it. It also help to save the bandwidth and with that your site will load faster.
First of all we will take a look at Image Hotlinking and its consequences.

What is Image Hotlinking ?

When you upload an image for inserting in to any post or page, that image it will get a link. You guys will noticed that, which we calls image links. We can use this link to show that image in any other post or site. But issue comes when some guys theft this link and add to show image on their website. This is mentioning as Image Hotlinking, and it cause severe problems like traffic loss, bandwidth loss etc.

Even I noticed that some guys taking entire posts of mine even with the images. When some one visits those site’s, the images will load from our hosting server. Which cause severe loss in bandwidth. So if you are feeling that your site loading slowly, then this may be one of the reason. So take a look at how we can prevent this act.

Preventing Image Hotlinking with .htaccess file

For this, you have to edit your .htaccess file and paste the below code in to it. Change the “mysite.com” with your own site name (avoid www, its already included there).

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mysite.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]

Preventing Image Hotlinking with the use of Plugin

Plugins are best options and there one best plugin for preventing this theft. The plugin named “ByREV WP-PICShield” do this work for you. You can install this plugin by visiting that link or just search it on Add New plugin.

ByREV WP PICShield plugin prevent image hotlinking

 

 

It also has several other features:

  • It supports cashing and save resources & speed-up your website.
  • You can define a list of other sites (referrer) that are allowed to display images from your site.
  • It defines a list of search engines or bots that are allowed to access/crawl the real images
  • Watermarking is another feature. Watermark over image custom position: top, center, bottom.
  • You can write source host over images.

 

Also Read: 

 

M S Sujeesh

Leave a Reply

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