Content pirates often use hotlinking to use your images as their own, using your bandwidth in the process. In this post, we’ll go over what you need to know about it and how to avoid it.

What Is Hotlinking?

What Is Hotlinking?

If you share a beautiful picture or video on your WordPress blog, it’s possible that others would appreciate it and want to use it on their own sites.

This admiration might become a problem if they use your content without permission, particularly if they also use your bandwidth — whether intentionally or unintentionally.

Hotlinking is the process of copying an asset’s URL and connecting it directly to yours to view the material on another website.

This way, every time someone visits a website with hotlinks to your assets, your bandwidth is used. The more users who access the content, the faster your bandwidth will be depleted.

Most people hotlink because they’re lazy and don’t bother to ask permission or host the content on their own server. Of course, there are moments when it is done solely due to ignorance.

Many people still believe that keeping material on its original site rather than downloading and re-uploading it is preferable. People try to stop breaching copyrights by doing so. This is a misunderstanding.

Hotlinking is a poor idea for the following reasons:

  • If the content is free to use or branded as creative commons, it is immoral and illegal.
  • It has the potential to significantly increase spending because it allows the original image holder to consume an enormous amount of bandwidth.
  • It overburdens the server because it uses your resources to access the picture on another platform.

Although stealing content is illegal in and of itself, hotlinking has a negative effect on the output of your website.

As previously mentioned, running out of bandwidth and experiencing site slowdowns are only two of the possible outcomes.

The worst-case scenario is an increase in your monthly expenses or a termination charge from your hosting company. If you can’t make the payment, you’ll lose your website and all of your money.

That is why it is important to avoid hotlinking.

How to Prevent Hotlinking in WordPress?

How to Prevent Hotlinking in WordPress?

Before you go any further, there’s a trick you can use to see if your content is hotlinked somewhere on the internet.

All you have to do is type in url:example.com -site:example.com in Google image search.

Your domain name should be replaced with example.com. This will show all photos that are hosted on your site but are also available on other sites.

You can take a closer look at the HTML, other websites would use something like this:

http://yourwebsite.com/wallpaper.jpg” height=“1280” width=“800″>

While the original file on your HTML page would look like this:

You can take a closer look at the HTML, other websites would use something like this:

If you want to enable hotlinking protection, there are several ways to do that:

1. Using an FTP Client

Using an FTP Client

One of the most powerful ways to avoid hotlinking is to use this tool.

FileZilla is a free FTP client that we suggest if you don’t already have one. Before continuing, you can set up FileZilla.

To use this tool, locate the.htaccess file (assuming you already have one) and paste the following code into it:

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

Essentially, this code would prevent all sites from hotlinking. As a result, you must replace example.com with your own domain and include search engines. This will add the domains to a whitelist. You must also specify which file formats to block, as seen in the code’s last line.

It’s important to remember that including search engines is essential because it allows them to crawl your images.

2. Using a CDN

Using a CDN

A content delivery network (CDN) enables websites to better manage traffic by using a group of servers spread all over the world. Using a CDN decreases bandwidth consumption, improves speed, and increases protection.

Each CDN has its own set of rules, so you might have to use a different method to avoid hotlinking. KeyCDN, for example, has a Zone Referrers feature that prevents other websites from embedding your assets on their own.

Go to the Zone Referrer menu after you’ve logged in to the KeyCDN dashboard and configured your referrers. Then, to map the Zone referrer, select a zone and save it.

Basically, you’ll need to configure your zone URL (kxcdn.com), your origin URL (yourwebsite.com), and your zone alias to access your properties (cdn.yourwebsite.com).

3. Using WordPress Plugins

Using WordPress Plugins

If you want to use a plugin, All in One WP Security and Firewall is a good option. This is one of the most effective security plugins for preventing hotlinking.

Once installed and activated, go to WP Security -> Firewall -> Prevent Hotlinks. You can check Prevent Image Hotlinking and click Save Settings.

If you want to go with a simpler way, just disable right-clicking on content. You can go to WP Security -> Miscellaneous -> Copy Protection. Check on Enable Copy Protection, and Save Copy Protection Settings.

Or, you can use plugins like Prevent Content Theft or WP Content Copy Protection & No Right Click.

4. Accessing Control Panel Settings

Accessing Control Panel Settings

Finally, the control panel settings enable you to disable hotlinking.

To begin, you must first log into your hosting account. Then select the Hotlink Protection option from the Security options menu. Set the settings and save until you see the setup screen.

Conclusion

Hotlinking is a bad idea that can lead to serious issues. Hotlinking prevention is a simple process, so there’s no need to put it off.

You can defend your website from hotlinking by doing the following:

  • Using an FTP client
  • Using a CDN
  • Using WordPress plugins
  • Accessing cPanel settings

Choose your preferred choice and continue to secure your WordPress account!