This article explains how to enable hotlink protection on GHFS Hosting using Plesk. Hotlink protection prevents other websites from directly linking to your images, videos, or other files, which helps save bandwidth and protects your content.
1. What Is Hotlink Protection?
Hotlinking happens when another website displays files stored on your hosting account by directly using their URL.
Example:
They embed your image like:https://yourdomain.com/images/photo.jpg
This uses your bandwidth, not theirs.
Hotlink protection blocks these external requests.
2. How to Enable Hotlink Protection in Plesk
Plesk controls hotlink protection through Apache/nginx settings or additional directives.
Steps:
-
Log in to your Plesk control panel
-
Go to Websites & Domains
-
Click Apache & nginx Settings for the domain
-
Scroll to Additional Apache directives
-
Add the following code:
Replace yourdomain.com with your actual domain.
-
Save the changes
-
Clear your browser cache and test
Hotlink protection is now active.
3. How This Rule Works
The rule blocks access to image files unless the visitor came from:
-
yourdomain.com
Any other website trying to load your images will receive a 403 Forbidden response.
4. Allowing Certain Websites
If you want to allow specific partner sites to use your images:
Add more allowed referers:
Add as many exceptions as needed.
5. Protecting Additional File Types
You can extend protection to video, audio, or document files:
Add these to the existing rule if needed.
6. Testing Hotlink Protection
To confirm it works:
-
Open another website or a test HTML file
-
Insert a direct URL to your image
-
Load the page
If protection is active, the image will NOT load.
7. When to Contact GHFS Hosting Support
Contact support if:
-
Hotlink protection does not work
-
You accidentally blocked your own website
-
You need help writing custom rules
-
You are unsure where to place the code
-
Your site uses nginx-only hosting and requires different configuration
Support can help configure and troubleshoot hotlink protection safely.