Hotlinking (also called inline linking or direct linking) happens when another website links directly to files hosted on your site, usually images, videos, or other media. This causes your server to deliver those files to visitors of the other site, consuming your bandwidth without permission.
Hotlink protection in cPanel prevents this by blocking external sites from embedding your files.
Steps to Enable Hotlink Protection
-
Log in to cPanel.
-
On the Tools page → Security section, click Hotlink Protection.
-
Click Enable.
-
Configure the following options:
-
URLs to allow access → Enter trusted domains that can use your files (your own domain is added automatically).
-
Block direct access for the following extensions → Specify file types to protect (e.g.,
.jpg,.jpeg,.png,.gif,.bmp,.mp4). -
Allow direct requests → Optional. If checked, users can still access files by typing the URL directly in their browser.
-
Redirect request to the following URL → Optional. Enter a page visitors will see instead of the hotlinked file (e.g., a custom error or landing page).
-
-
Click Submit to save changes.
Steps to Disable Hotlink Protection
-
Log in to cPanel.
-
Go to Security → Hotlink Protection.
-
Click Disable.
Notes
|
-
If you run a CDN or external service, ensure its domain is whitelisted.