Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

What is: Hotlinking

Hotlinking is when someone displays one of your images or media files on their website by directly linking to your image URL. They do this without your permission.

It is generally considered bad practice. Hotlinking often happens when someone has stolen the image or entire post, violating your copyright. And because the image is still in your media library instead of theirs, it can slow down your site.

Luckily, you can easily disable hotlinking on your WordPress website.

Glossary: Hotlinking

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 is usually a sign of image theft or worse. It means that someone is displaying images from your website on their own without your permission.

They may have also copied some of your written content, such as the posts the images appear in, and might be taking traffic away from your site.

This is illegal and unethical since your website content is covered by copyright laws.

Maybe the other website owner doesn’t know better or understand how copyright works. Or they could be content thieves who are systematically scraping other people’s blog content to use on their own websites.

In any case, you can learn the best ways to deal with this in our guide on how to easily find and remove stolen content in WordPress.

2. Slow Performance

When someone copies a post or even just an image from your website to theirs, the image itself is not copied. Instead, they use a link to where the image can be downloaded.

The image is still located in your WordPress media library.

This means that every time the image is viewed by visitors on the other person’s website, it is downloaded from your website.

This takes away valuable resources from your server and slows down your WordPress performance, potentially resulting in a poor 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]

Make sure you replace wpbeginner.com with your own domain name.

This code won’t stop the images from being displayed on your own website or Google search results pages. But it will stop any hotlinked images from loading on other websites.

Instead, visitors to those other websites will only see the image’s alt text, like this.

Alt text displayed next to a broken image icon

We hope this article helped you learn more about hotlinking in WordPress. You may also want to see our Additional Reading list below for related articles on useful WordPress tips, tricks, and ideas.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Additional Reading

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!