Bytenap Networks


Website traffic is highly important for the success of any online business. And when a website follows the practice of image hotlinking, they are also doing damage to overall site performance, SEO, and image ranking.

Hence, you must understand the importance of restricting image hotlinking in WordPress before it turns out to be a disaster.

Before we dig in deep, let’s understand the definition of image hotlinking so you will better understanding how to safeguard your website and thereby enhance the security of the WordPress site.

Image Hotlinking: Definition

Image hotlinking is a practice followed by content stealers wherein they copy the image link of your site and directly paste them to their site.

It’s an unethical practice to use images of other websites. In image hotlinking, the content robbers are using the resources of the original image’s website. As a result, the website performance becomes sluggish.

Why Avoid Image Hotlinking?

Basically, image hotlinking is considered to be content stealing. It is so illegitimate that websites can send DMCA notices for stealing content.

This is one of the reasons why we always give hints about using non-copyrighted media content or content you have ownership of.

Now, let’s see the reasons why you should avoid image hotlinking:

Exhaust Server Resources:

Image hotlinking can drain the resources of the server from where the image has been taken.

To better understand this, let’s see an example:

You are on a shared hosting plan, and let’s assume that some high traffic website is linking your images to their post. What will happen here is that you will receive hundreds and thousands of queries to your site. This will result in resource exhaustion.

With ByteNAP’s Managed WordPress Hosting, we have hotlink protection in the first place. We ensure that we have a high quality so as to deliver you the optimal website performance.

Higher Bandwidth Bill:

As we explained to you with an example how hotlinking can result in server resource exhaustion.

So, now if you have chosen pay as you go plan, you will be charged extra for every additional server resource you use. However, this model is not the same with every web hosting provider.

Illegitimate and Copyright Issues:

Several websites on the internet have strict copyright policies. These copyright policies are set up in place so nobody can dare to steal media content from the site without anticipating legal consequences.

DMCA is created to stop content theft, illegal distribution, and data piracy. Original creator/writer should get the credit for his artwork/content.

How to Detect Image Hotlinking?

How to detect if someone is hotlinking your images?

In maximum cases, you will hardly recognize that someone is using your images for his personal benefit till you observe that the performance of your site has gradually been reduced.

You can follow our tried and tested method to detect hotlinking with ease.

Bandwidth Usage Check

Perform bandwidth usage checks at regular intervals. Look for the pattern, and if you find any traffic surge, analyze your bandwidth usage logs to determine who is consuming a huge chunk of your server bandwidth.

Check images in Google Image Search

To check if your images are being used on other websites, you simply type the below Google’s search operator

When you use this search operator, the results shown will be from another website, not yours.

Later, you can manually visit that page to check whether they are using your image on their website.

A good practice is that you prevent hotlinking images on WordPress

Look for new backlinks

To look for new backlinks, you can make use of the Powersuite tool. However, If you find any external backlinks (image links) on your website, then you need to manually look for its source.

If you find the image sources to be trustworthy, everything sounds to be good. And, by observing the site structure and pattern, you can easily know identify a spammy image website.

How to prevent hotlinking images on your WordPress site?

There are several ways to safeguard your images from hotlinking. Let’s see some of the options.

Use CDN for Protection against Hotlinking

Major websites across the globe use Content Delivery Network to improve their website performance and also to offer cached content copies from the visitor’s proximal data server.

Some of the widely famous CDNs like CloudFlare CDN, KeyCDN, etc have the ideal tools that offer assurance that your site will be secured even against image hotlinking protection.

WordPress being the most beginner-friendly website, you can enable/disable image hotlinking with ease.

Below are few steps to disable hotlinking in CloudFlare

  • First step is to login to the CloudFlare account
  • Pick the website where you want to disable hotlinking
  • From the toolbar menu, find Scrape Shield button and click on it
  • Search for the Hotlink Protection option and enable that option

Enable Hotlinking Protection on Nginx

If you are running a WordPress site is on an Nginx server, you simply need to add the below code to the config.php file.

location ~ .(gif|png|jpeg|jpg|svg)$ {
     valid_referers none blocked *;
     if ($invalid_referer) {
        return 403;

For doing this task, you need assistance from your web hosting provider. In case, you are with ByteNAP, you need to raise a ticket and leave it to us, we got your back.

Enable Hotlinking Protection on Apache

If you are running your WordPress site on Apache, you can make some modifications to the .htaccess file and easily deactivate image hotlinking.

However, it is always a good practice to do a proper backup of the .htaccess file before you do any changes. We suggest you do so because backups will be handy even if something goes wrong.

  • Login to your cPanel
  • Open the file manager in cPanel
  • Navigate to the public_html folder (or the folder/ directory where the website is present)
  • Locate the .htaccess file
  • Open it to add few lines of code
  • Do the necessary changes and save the file

Below we have provided you with the code that you need to add it in your .htaccess file:

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

The second line of the code is simply a blank referrer

Starting from the third line, we can begin adding the domain that is enabled to hotlink the image. There, you need to add your domain name.

Fourth, the fifth and sixth line is for search engines, you don’t want them to be blocked

Eventually, the seventh line is for the image you want the user to see in place of hotlink protected image.


Image hotlinking is a serious issue if not controlled on time, it can prove to be disastrous.

ByteNAP is one of the best VPS Hosting Cheap Linux server provider in India with 24/7 efficient support, Free SSL & 100% Pure SSD Servers.

Social Media

Stay Informed For Online World & Business Updates!

Scroll to Top

Linux Reseller Hosting Comparison Plan

SSD Disk
cPanel Accounts
Free Migration
Free SSL Certificates
Domain Hosted
350+ one click Script Installer
Weekly Backups
Free SSL Certificates
CloudFlare CDN
Domain Reseller Account
Private Name Servers
WHM Panel
Client Backup Restores
Per cPanel SSH Access
Add-On Domains
Parked Domains
FTP Accounts
CPU Core
1 Core
1 Core
1 Core
1 Core
1 GB
1 GB
1 GB
1 GB
Entry Processes
IO Speed
4 MB/s
4 MB/s
4 MB/s
4 MB/s
LiteSpeed Web Server
PHP v5.6 to latest
MySQL / MariaDB
Web Application Firewall
CloudFlare CDN
DDoS Protection
Server Locations
US | CA | DE
DDoS Protection
Web Application Firewall
Brute-Force Protection
Brute-Force Protection
Two-Factor Authentication
Email Virus Scanner
CageFS Account Isolation
Uptime Guarantee
24x7x365 Support
Live Chat Support
Free Migration
Cancel Anytime
Instant Setup
Instant SetupDedicated IP
Upgrade to Daily Backups

Managed Services

Managed Support

Get fully managed support from Experts
with Pro Active monitoring


Domain Registration

Register Domain Today

Domain Transfer

Domain Transfer are Quick, Easy &


Cloud Mail

Connect & Collaborate with Customers

Google Workspace

Create, Communicate & Collaborate

Security & Backup

SSL Certificate

Secure Your Data & Transactions with SSL Certificate


Secure your Webpages with BitNinja Server

Acronis Cloud Backup

Secure Data Backup for Businesses of All Sizes


Bare Metal Servers

Solid Performance Bare Metal Server

GPU Servers

Next-Generation GPU Server

Clearance Servers

Stable Clearance Dedicated Server

Cloud VPS

Linux VPS

Get Faster Loading Speed with Linux VPS Hosting

Windows VPS

Leading Windows VPS Hosting

Managed Linux VPS

Powerful Managed Linux VPS Hosting

Managed Windows VPS

Realiable Managed Windows VPS Hosting


Linux Hosting

Feature Packed Linux Hosting

Windows Hosting

Stable Windows Hosting Server

Wordpress Hosting

Best & Secure WordPress Hosting