How to Enable Hotlink Protection in cPanel
Posted about 4 months ago 3.6kWhat is Hotlinking
Bandwidth theft: Others embedding your images on their sites.
Enable Hotlink Protection
cPanel → Security → Hotlink Protection → Enable → Add your domains.
Allow Your Own Domains
List domains that can embed your images (your site, CDN, etc.).
Advanced .htaccess Method
Custom Rewrite Rules
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|webp)$ - [NC,F,L]
Protected Extensions Table
| Extension | Recommended |
|---|---|
| jpg, png, gif | Yes |
| webp, svg | Yes |
| mp4, pdf | Optional |