If you host download files on your own site, other websites might steal your bandwidth by directly linking to your files — that’s hotlinking.
Here’s how to stop it and save both money and server speed.
✅ 1. What is hotlinking?
It happens when:
-
Someone links directly to your file (e.g.,
.exe,.zip) -
Their visitors download using your server, not theirs
✅ You pay the traffic, they get the benefit.
✅ 2. Enable hotlink protection via .htaccess
If you’re on Apache server, add this:
✅ Blocks external sites from loading your files.
✅ 3. Use Cloudflare hotlink protection
-
Free Cloudflare account → Enable “Hotlink Protection”
-
Automatically prevents image, video, file theft
✅ Works even without coding skills.
✅ 4. Rename download file paths dynamically
Use random or time-limited filenames (e.g., file-9ab3z.zip)
-
Can be auto-generated via PHP or CMS plugins
✅ Prevents static linking.
✅ 5. Monitor traffic and referrals
Use:
-
Google Analytics → Referrals
-
Cloudflare → Bandwidth by domain
-
Server logs
✅ Spot suspicious sources hotlinking your files.
Key points to remember
-
Hotlinking = bandwidth theft
-
.htaccess and Cloudflare = quick defense
-
Dynamic URLs prevent direct linking
-
Monitor referral traffic regularly