Hotlink protection gives you the ability to protect certain files on your server from being directly linked by another site. For example, if you have images that are published on your site and are very popular, you can prevent other sites from using those images with an <img> tag pointing to your domain.
This will not prevent people from downloading your files. It is merely a measure to stop remote linking, which can unnecessarily eat up your bandwidth, especially for very popular content.
To configure hotlink protection in cPanel, follow these simple steps:
- Login to cPanel, and in the “Security” section, click “HotLink Protection”
- If it is currently disabled, click the “Enable” button to activate it
- In the “URLs to Allow Access” box, enter any URLs that you want to give special permission to hotlink to your site. NOTE: If you own multiple domains on your server, you may want to keep all of them listed in the box.
- Enter any specific file types you want blocked from hotlinking, even for sites that have hotlinking allowed. NOTE: Certain streaming audio and video files, such as Quicktime, may require hotlinking to be allowed.
- Check “allow direct requests” if you still want users to be able to enter the direct URL of a file, such as an image.
- In the “Redirect requests to this URL” box, enter a custom page that you want users to be redirected to when they attempt to access a file that has been invalidly hotlinked.
- Click “Submit” to finalize the settings.
If you later decide to disable hotlink protection, simply return to the settings and click “Disable” at the top. For more information about hotlink protection or cPanel in general, consult the online documentation.