Guides › WordPress › Speed & performance

Hotlink Protection: Stop Other Sites From Using Your Images and Bandwidth

Other websites may link directly to your files. Block it in your hosting panel or .htaccess.

Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.

Hotlinking means another site displays your images from your server, using your bandwidth.

Easiest: hosting panel

Many panels have a Hotlink protection tool. Add your own domain (with and without www, and http and https) as allowed, and choose which file types to protect.

.htaccess method

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^https?://(www\.)?yourdomain\.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|webp)$ - [F,NC]

Careful

High bandwidth?

See our bandwidth guide.

Related guides

Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.

Last updated 2026-11-21.