Hotlink Protection in cPanel

From Lunarpages Web Hosting Wiki

Hotlink protection allows you to prevent others from linking directly to images or files on your site from their site. Aside from illegally using your images, they would be using up your bandwidth!

How to Activate Hotlink Protection in cPanel

Cpanel new security box.png

To get started, login to your cPanel. Scroll down to the Security section and click on the icon for Hotlink Protection.


As you can see, hotlink protection is disabled by default. Click on the Enable button to activate this feature. Once Hotlink Protection is enabled people will not be able to link directly to images, movies, etc. directly on your site (for example, on a blog).

Under the text "URLs to Allow Access:", you should see a large text box where you can list your domain names. Ensure that all variations of your site URL are listed here. Such as:

Also if you have subdomains set up, or addon domains you wish to give access to your images on, be sure they too are also listed in the text box with one URL per line.

The text box next to Block direct access for these extensions (separate by commas): is pretty self-explanatory. This is where you would list all of the extensions you would like to allow to be shared with the URLs you listed in the text box above.

As an example, you could put in: jpg, jpeg, gif, png, bmp

For the Redirect request to this URL: you can enter the URL to which you would like to redirect anyone who tries to hotlink to you.

Lastly, if you check the box for Allow direct requests (ie. entering the url to an image in your browser) this means that anybody will be able to view your image by entering the address into the browser.

Please note: The "Allow direct requests" checkbox must be checked when using HotLink Protection for files that you wish to be viewed in QuickTime (Mac Users) by your site's visitors.