Hotlink Protection Defends Bandwidth and Servers
Hotlink protection is an important tactic in protecting website performance and ultimately its audience and revenue.
What are hotlinks? Websites that hotlink display content on their sites that they pull from other websites. The content they display is usually either images or videos.
For example, a site that uses the code ‘img src=”https://www.anothersite.com/their_photo”‘ is able to display a photo on their site that is stored on the other site’s server.
It matters because hotlinking sites aren’t using their bandwidth, server space or server CPUs and RAM to display the content. Instead, they are putting those demands on the sites that have the content.
As a result, sites that are hit with hotlinks are using their own bandwidth and server capacity at a cost while giving the hotlinking site all of the benefits. The business cost is especially deep with video, although sites that use YouTube or other video sites to host video don’t have to worry about it.
If the hotlink demands rise high enough, they could slow site performance, impact audience and undermine revenue. To put it in perspective, a travel guide owned by this company blocked 924 hotlink attempts in the 24 hours before the writing of this article. And it’s only a mid-sized websites.
Copyright Violations
Hotlinking has yet another downside to it. Sites that own photos and graphics normally have copyright protections. But hotlinking violates those copyrights.
It matters because sites with unique images they create and own are providing them as a benefit to their site visitors. But those images lose value and benefit if they are readily available on other websites.
Hotlinking Isn’t All Bad
YouTube is a good example of how hotlinking is sometimes mutually beneficial to a business and website. YouTube videos have an icon underneath them that says “Share”. Anyone who clicks on Share can see the options for sharing a video on social media, but the list also includes the word “Embed”.
Clicking on the Embed option produces code that anyone can place on their own website. When visitors see a video on that other website, it actually is streaming from YouTube and not the website. YouTube benefits because it displays ads on the video that pays for the bandwidth and server space. The website benefits from having video content without paying for it.
Website publishers have few legal or ethical worries from hotlinking images and videos from government websites. That content is almost always in the public domain. It exists to serve the entire public and not just one website.
But these are exceptions. Most hotlinking takes content at a cost to the source website — almost always without permission and without providing any benefit.
How to Stop Hotlinking
Website publishers have at least three ways of setting up hotlink protection.
- Many website hosting companies offer the cPanel web hosting control panel that includes a hotlink protection tool.
- Sites that use a Content Delivery Network (CDN) such as CloudFlare also have such a tool available.
- Sites that don’t have or want either of the above options can set up hotlink protection in their root domain’s .htaccess file. One example is:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?sitename.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]