11/25/2024 | News release | Distributed by Public on 11/25/2024 06:03
Updated: November 25, 2024
Published: January 05, 2021
One of the first things I was taught not to do when learning about black hat SEO was hotlinking. It was one of those things crooked marketers did to reduce their bandwidth usage costs or deliberately attempt to slow competitor websites.
Since you own a public website (whether a personal one or for your business), it's crucial to be on high alert against these techniques.
In this article, I'll explain what hotlinking is and how to prevent it from happening to your website.
Table of Contents
Hotlinking is the act of linking to a file that is hosted on another site, instead of downloading the file, hosting it on your own server, and providing proper citation. Images are most frequently hotlinked, but audio files, movies, flash animations, and other digital assets can also be hotlinked.
In other words, image hotlinking is the act of using someone else's images on your website by directly linking to those images from your website.
Hotlinking is like someone secretly connecting a pipe to your home's gas line to heat their house. When they turn on their heat, they're using your gas, increasing your bill, while appearing to provide their own heating to anyone who visits.
That's exactly what hotlinking is - someone else using your resources (bandwidth) to power their website while you foot the bill. So much cunning.
Create and customize your own business website with an easy drag-and-drop website builder.
As a marketing expert, I've seen my fair share of tactics that ultimately do more harm than good. One of them is hotlinking.
Here are some reasons I consider hotlinking to be a bad idea.
When you choose to hotlink a media file, you have no control over what the file's owner might choose to do with it.
If the owner wants, they can delete the file and you're left with broken media on your website.
Some others have gone as far as substituting the hotlinked media with inappropriate content to serve as a warning.
As a creator and website owner, I know firsthand the time, effort, and resources that go into producing quality digital media.
I wouldn't want anyone to take what I create and use it without permission.
In the event that someone hotlinks your website content, you could take legal action against such a person. However, legal fees can run high and become an expense you cannot afford.
Since hotlinking requires the website hosting the file to use its own bandwidth to load it on your site, it's considered poor etiquette.
I'll even call it theft.
That's because it eats up the bandwidth of the site you took it from without giving them the benefit of increased traffic.
In other words, you're essentially making that website pay for part of your hosting bill.
That's how American cartoonist Matthew Inman felt when the Huffington Post UK hotlinked one of his comics. Since he owned and hosted the multiple images that made up the comic, he replaced them with a note and a screenshot of his monthly hosting bill. Here's a screenshot of how the article appeared on the HuffPost after he made the swap:
To avoid running into a similar situation as Inman, you can take steps to prevent websites from hotlinking files hosted on your website. Let's dig a little deeper into this below.
Hotlinking protection is protecting a website's content - most commonly images - so that only authorized users can access it.
This is important because hotlinking can be detrimental to websites, leading to excessive usage of server resources, slow page loading times, and increased hosting costs without any benefits to the site owner.
Investing in hotlinking prevention can save valuable bandwidth and increase your website's speed and performance.
Additionally, hotlinking prevention can safeguard your website from being associated with other less reputable sites that may be hotlinking to your content.
This tactic can also help search engines recognize that your site is of higher quality and more professional than those that allow hotlinking.
Below are various preventive and reactive measures you can take to stop others from hotlinking your files. Doing so can help protect your bandwidth and optimize your website performance.
The easiest and safest way to prevent hotlinking is to use a CDN that offers built-in hotlinking protection.
For example, Cloudflare offers hotlink protection to prevent other websites from linking to your image resources or abusing your bandwidth.
Once enabled, this feature will block websites from linking directly to your image resources. These users can still view and download images from your website, however, which means they could properly download, host, and cite images from your website.
Please note that hotlink protection may interfere with crawling bots such as Googlebot, preventing them from accessing and indexing your content - which could affect your SEO and traffic.
Another way to prevent hotlinking on your site is to add the following snippet of code to your hypertext access file.
You can access this file using an FTP client or File Manager.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)example.com/.*$ [NC]
RewriteRule \.(gif|jpg|jpeg|bmp|zip|rar|mp3|flv|swf|xml|php|png|css|pdf)$ - [F]
Please note you'll have to replace "example.com" in the third line with your domain name.
To hotlink an image, users typically right-click the image, copy the image address, and embed the URL onto their site.
To prevent hotlinking, it would make sense to disable the right-click functionality then. Or would it?
Disabling right-click functionality on your images is a controversial solution - mainly because it won't prevent all users from hotlinking. Some users will easily be able to work around this obstacle if they are insistant on hotlinking your images.
However, disabling the right-click functionality may stop users who would have unintentionally hotlinked or done so without malicious intent. In that case, reducing the total number of image copies on your site might be worth trying.
Here's the pure JavaScript you'll need to add to your site.