Search Our Database
How to enable hotlink protection in cPanel
Introduction
Hotlink protection is a feature that prevents external websites from directly linking to files on your server, such as images, videos, and documents. This helps protect your server’s bandwidth and keeps your content safe from unauthorized use.
If hotlinking is not restricted, other websites can embed your files using your hosting resources, slowing down your website and increasing server load.
This guide will show you how to enable hotlink protection using the cPanel control panel.
Prerequisites
Before you begin, ensure that:
-
You have access to your cPanel account.
-
You know which file types you want to protect (e.g., jpg, png, mp4).
-
You have your domain name ready to whitelist as a valid referrer.
Steps to Enable Hotlink Protection in cPanel
Step 1: Log in to cPanel
Open your browser and navigate to your cPanel URL (e.g., https://yourdomain.com:2083 ).
Enter your username and password, then click Log in.
Step 2: Open the Hotlink Protection Tool
Once logged in, scroll down to the Security section.
Click on Hotlink Protection.
Step 3: Configure Hotlink Protection Settings
-
Enable Hotlink Protection:
Click the Enable button at the top of the page. -
URLs to Allow Access:
Add your domain names (e.g., yourdomain.com, www.yourdomain.com so your own site isn’t blocked from using its own files. -
Block Direct Access to These Extensions:
List the file extensions you want to protect.
Example: jpg, jpeg, png, gif, webm, mp4, pdf -
Allow Direct Requests (optional):
Check this if you want to allow access from users with no referrer (e.g., bookmarks, email links). -
Redirect Request (optional):
If someone tries to hotlink a file, they will be redirected to this URL.
Example: https://yourdomain.com/nohotlink.jpg
Step 4: Save the Settings
Click Submit to save and activate Hotlink Protection.
Conclusion
Hotlink Protection in cPanel helps you defend your content and bandwidth from being misused. By enabling this feature and customizing access, you can maintain better control over your hosted files.
If you face any issues or have any questions, our support team at IPSERVERONE is always ready to assist you. Feel free to contact us at support@ipserverone.com for any assistance.