Security

Hotlink Protection

Updated: 19 February 2024
cPanel Version: 118

Hotlink protection prevents other websites from directly linking to files (as a rule, images) on your website. If another website links directly to your site, bandwidth is used on your account. You can prevent this from happening by activating hotlink protection in cPanel. This tutorial will guide you step-by-step on how to use the Hotlink Protection Menu in cPanel.

Accessing cPanel

First things first, you need to access your cPanel. This is generally done by typing your website URL followed by /cpanel. For example, www.yourwebsite.com/cpanel. Enter your username and password to proceed.

  1. In your cPanel interface, locate the Security section.
  2. Click on the Hotlink Protection icon. This will take you to the Hotlink Protection interface.

Now that you're in the Hotlink Protection interface, let's go through the process of setting it up.

  1. Click on the Enable button to turn on Hotlink Protection.
  2. You will see a list of URLs that can access your site's files. Ensure your website is in this list. If not, add it manually.

Protected Extensions

  1. Under the "Extensions to allow" section, specify the types of files you want to protect from hotlinking.
  2. Common extensions to protect include .jpg, .gif, .png, .bmp, etc. for images and .mp4, .mov, .wmv for videos.

Redirecting Hotlinked Files

  1. If you wish to redirect requests for hotlinked files to another page, enter the URL of the redirection page in the "Redirect request to this URL" field.
  2. Click on the Submit button. Your settings are now saved.

Remember to Save Your Settings

Always remember to click on the "Submit" button after making changes to your hotlink protection settings. If you do not save your settings, they will not take effect.

If you ever need to turn off Hotlink Protection, simply navigate back to the Hotlink Protection interface and click on the Disable button.

Be Careful When Disabling Hotlink Protection

Disabling Hotlink Protection means that other websites can directly link to files on your website and use your bandwidth. Only disable this feature if you're sure it's what you want.
When you click Disable, the system deletes the entries in the List the URLs to which you wish to allow access list. We strongly recommend that you save the list locally before you disable hotlink protection.


External links

Hotlink Protection - cPanel Documentation