Skip to content

How do I stop other websites using my images (hotlink protection)? Print

  • hotlink, images, bandwidth, htaccess
  • 25

Hotlinking is when another website shows your images by loading them straight from your hosting, using your bandwidth. You can block it with .htaccess.

  1. Open the File Manager and go to httpdocs.
  2. Open .htaccess and add, using your own domain:
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^https?://(www\.)?yourdomain\.co\.nz [NC]
    RewriteRule \.(jpe?g|png|gif|webp)$ - [F,NC]
  3. Save the file.

Your own pages and people visiting image links directly still work. Other sites showing your images get a blank image instead.


Was this answer helpful?

« Back