Hotlinking occurs when someone embeds one of your images or media files on their website using a direct link to your image URL, without your authorization.
This practice is generally seen as unethical. It often takes place when someone has unlawfully taken your image or a complete post, infringing upon your copyright.
Additionally, since the image remains in your own media library rather than theirs, it can negatively impact your site’s performance. Fortunately, you can easily prevent hotlinking on your WordPress site.
What Are the Problems With Hotlinking?
Hotlinking is considered bad practice and unprofessional. Here are some important reasons you should be concerned if other people are hotlinking media files from your WordPress website.
1. Stolen Content
Hotlinking typically indicates image theft or something more serious. This practice occurs when someone uses images from your website on their own without obtaining your consent.
They might also have replicated some of your written material, such as the accompanying posts, and could be diverting traffic away from your site.
This behavior is both illegal and unethical, as your website’s content is protected by copyright laws. It’s possible the other website owner is unaware of copyright regulations or may simply not know any better.
Alternatively, they could be engaged in content theft, systematically plundering other blogs to populate their own sites.
Regardless of the situation, you can discover effective strategies for addressing this issue by consulting our guide on how to easily locate and remove stolen content in WordPress.
2. Slow Performance
When someone duplicates a post or simply an image from your website to theirs, the image itself isn’t actually transferred.
Instead, they link to the image’s original location for download. The image remains stored in your WordPress media library.
Consequently, each time visitors view the image on the other person’s site, it’s fetched from your server. This can drain your server’s resources and degrade the performance of your WordPress site, potentially leading to a negative user experience.
3. Additional Bandwidth
It will also impact your bandwidth, which is the amount of data downloaded from your site in a given month.
If you exceed your hosting plan’s bandwidth allowance, then you may be charged overage fees by your provider. Or you might need to upgrade to a more expensive hosting plan, increasing the cost of running your website.
How to Disable Hotlinking on Your WordPress Website
Luckily, you can easily disable hotlinking on your WordPress site by adding this code to your website’s .htaccess file:
#disable hotlinking of images with forbidden or custom image option RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?wpbeginner.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?google.com [NC] RewriteRule .(jpg|jpeg|png|gif)$ – [NC,F,L]
Be sure to substitute wpbeginner.com with your own domain name. This code won’t prevent your images from appearing on your site or in Google search results.
However, it will block hotlinked images from being displayed on external websites. Users visiting those other sites will only be able to see the image’s alt text, like this.
If you enjoyed this piece, consider subscribing to our YouTube Channel for tutorials on WordPress. Don’t forget to connect with us on Twitter and Facebook as well!