How to prevent other sites from linking files on your website

Sometimes you want to prevent other websites from directly linking to files present on you server. Hotlink Protection which is a security feature of cPanel allows you to specify URLs which are allowed to link files from your server. It helps to save bandwidth and it prevents the stealing of your content.

Example of linking

An image is present on your server and another website is displaying that image using <img> tag on their website. By enabling Hotlink Protection for files you can block or grant access to other websites.

You may follow the video tutorial given below or continue reading.

 

Steps involved in enabling Hotlink Protection

  1. Go to cPanel.
  2. Scroll down to Security tab.
  3. On clicking HotLink Protection you will be presented with a configuration screen.
  4. Initially you will see that the protection is currently disabled. You need to enable it first then you can alter the settings.
  5. On clicking Enable you can see the allowed URLs and protected extensions.
  6. Go back to edit the list of allowed URLs and blocked extensions according to your need.

    Note: If you select the checkbox to allow direct request then users can directly access the file by entering URL of that file into a browser. So to disable this feature keep it unchecked. This feature comes in handy when you want only members of your website to download certain file.
  7. You can specify the custom message on a URL if user try to access a blocked file on your server by specifying URL in the field given below. 
  8. Click on Submit to complete save the settings.
Was this answer helpful? 0 Users Found This Useful (0 Votes)