Enter your search term

Search by title or post keyword

Hotlinking: What It Is, Why It Matters, & How To Stop It

Level up your digital marketing skills with our free courses, expert insights, forums, and social groups!

Check it Out

Are you concerned that other websites may try to steal bandwidth associated with your images or other assets such as videos or documents?

Hotlinking is the act of directly linking to files (usually images) located on another website.

When someone hotlinks your image, they steal bandwidth from your website’s servers.

This article will explain more details about hotlinking, why it matters, and how to stop it from happening to you.

What Is Hotlinking?

In the context of images, hotlinking is when a website owner links to an image hosted on another site instead of uploading it to their server.

It can result in bandwidth theft and decreased page load times.

What Does It Mean if an Image Is Hot-linked?

If someone hotlinks an image, they link to another site without the owner’s permission.

For example, let’s say that you start a blog and hotlink an image from your friend’s blog.

Your friend’s blog is now hosting the image for your blog.

Their server must work harder because of it.

It becomes a problem if the hot-linked image is popular and gets a lot of traffic.

It can slow down or even crash the original site hosting the image.

In addition, hotlinking can cost your friend more money associated with their bandwidth needs.

There are a few different ways that hotlinking can occur.

Inline linking occurs when a website owner links to an image within the HTML code of their page.

Another way hotlinking happens is when a website owner links to an image using a URL instead of HTML code.

Lastly, a website owner can use Iframe hotlinking.

It involves linking to an image using HTML code.

Why Does Hotlinking Happen?

There are a few reasons why hotlinking might happen.

  • A website owner doesn’t know hotlinking is bad
  • A website owner wants to save bandwidth
  • A website owner wants to steal traffic from other sites

Why Should I Care About Hotlinking?

Hotlinking will negatively affect your website.

Why Is Hotlinking Bad?

There are a few reasons hotlinking is bad.

It’s bandwidth theft: When someone hotlinks your images, they’re using your bandwidth.

As a result, the process can slow down your site.

It wastes resources: Hotlinking also wastes the server’s resources that are hosting the hot-linked image.

If too many people hotlink the same image, it can overload the server and cause it to crash.

It’s copyright infringement: You’re violating their copyright if you hotlink an image without the owner’s permission.

It could result in a lawsuit or other legal action.

How Do You Find Out if Someone Is Hotlinking Your Images?

There are a few ways to find out if someone hotlinked your image.

Check your access logs: Your website’s access logs will show you all of the incoming traffic to your site.

If you see an IP address that isn’t yours, it could be someone hotlinking your images.

Google “hotlink detector”: There are several hotlink detectors available online.

Just enter your URL, and they’ll scan the web for hot-linked images.

Use Google Images: Go to Google Images and search for your image.

If you see it on a site that isn’t yours, you know someone hotlinked it.

You can easily filter your site out of the search using this command: inurl:mywebsite.org -site:mywebsite.org

Hotlinking Protection

At this point, you’re probably worrying about all the potential hotlinking scenarios involving your website.

vector graphic showing an illustration of hotlinking

Is Hotlink Protection Necessary?

You need to do everything possible to avoid others from performing hotlinking acts that slow down your website or even shut it down completely.

Google uses website speed as a significant ranking factor.

Allowing others to affect how quickly your pages load can lead to lower Google rankings.

Imagine what might happen if an unethical competitor uses hotlinking against you.

How Can You Prevent Hotlinking?

Here are a few effective ways to prevent hotlinking.

Method 1: Using an FTP Client

If you want to stop hotlinking, you can access your server via FTP.

Here’s how the process works.

First, connect to your server using an FTP client.

Next, locate the .htaccess file.

If you don’t see it, make sure that you have set your FTP client to show hidden files.

Once you’ve found the .htaccess file, open it in a text editor.

There are different types of code you can try using with your FTP client.

Here is one potential option to try.

  • RewriteEngine On
  • RewriteCond %{HTTP_REFERER} !^$
  • RewriteCond %{HTTP_REFERER} !^http://(www.)?example.com/.*$ [NC]
  • RewriteRule .(gif|jpg)$ http://www.example.com/hotlink.gif [R,L]

Where it says example.com in the above code, use your domain name instead.

Using this type of code won’t allow a hot-linked image to load correctly.

Before using this code, you may want to consult with your hosting company.

Method 2: Using a WordPress Plugin

If you have a WordPress site, hotlink protection is easy to add.

You can install and activate a plugin such as the Hotlink Protection plugin.

The Hotlink Protection plugin automatically creates the required code to prevent your website from suffering the negative aspects of hotlinking.

You can also try these plugins.

As with all WordPress plugins, make sure your chosen hotlinking solution will work well with your website’s theme.

Once your plugin is activated, go to the Settings section and select which file types you want to protect from hotlinking.

By default, most plugins protect all image files.

You can also enter external websites from where you want to allow hotlinking.

Method 3: Using a CDN

A content delivery network or CDN can help protect your website against hotlinking in multiple ways.

When you use a CDN, multiple locations worldwide serve your images and other static files.

As a result, the process reduces the load on your server, making it less likely that hotlinking will affect your website’s performance.

Additionally, many CDNs provide hotlink protection as part of their service. For example, Cloudflare offers hotlink protection as part of its free plan.

Method 4: Accessing cPanel Settings

If you’re using a shared hosting account, you’ll likely have access to the cPanel.

To find hotlink protection settings in cPanel, look for the Security section.

From there, select Hotlink Protection or something similar.

What Are Other Methods You Can Implement To Avoid Hotlinking?

If you can’t use the four above methods, you can also try the following hotlink prevention methods.

  • Disabling HTML code that allows users to right-click on images
  • Creating a password-protected directory
  • Watermarking your images

Can I Allow Hotlinking To Specific Images?

It is possible to allow hotlinking for specific images while still preventing hotlinking for the rest of your website’s images.

One way to do this is by using an FTP client, as described in method one.

Frequently Asked Questions

If you use Joomla, you may wonder what to do in this case.

How do I prevent hotlinking in Joomla?

Do you run your website on the Apache server?

If so, you can open the .htaccess file and use the RewriteEngine On code explained above in Method 1.

Or, you can access your cPanel and use the Security section’s Hotlink Protection feature.

Wrapping Up

Hotlinking can cause negative consequences for website owners, including decreased performance and potential loss of revenue.

In this article, we’ve shown you four methods that you can use to protect your website from hotlinking. Use one of these options to prevent falling victim to hotlinking.

Leave a Comment