How to Configure HotLink Protection

HotLink protection allows you to block other websites from directly linking and using your files on their website (for example images). If you are not using HotLink protection then other websites could link to your files which would increase your site bandwidth usage. Luckily cPanel has a built-in tool where you can enable HotLink protection with a single click.

What you’ll need

Before you begin this guide you’ll need the following:

  • Access to control panel of your hosting account

Option 1 – Enabling HotLink protection via Hostinger control panel

Configuring HotLink protection in Hostinger control panel is quick and easy. To begin, you will need to navigate to Hotlink Protection section located under the Other category.

HotLink protection location in hostinger

You will then be redirected to a setup screen.

Enabling and saving hotlink protection

  1. URLs to allow access includes your domain name by default, otherwise access would be blocked to your own domain as well.
  2. Block direct access to these extensions section allow you to choose what type of files should be protected. We recommend enabling it for ALL file extensions.
  3. Direct requests lets you choose whether you want to allow visitors to access your images or other media (for example:
  4. Redirect blocked requests to this URL has the ability to redirect blocked requests to a specific page.

Once these sections are reviewed and filled-in, toggle Enable and press Save to apply the new settings.

hotlink protection setup complete

Congratulations, HotLink protection has been successfully enabled for your website!

Option 2 – Enabling HotLink protection via cPanel

Firstly, access your cPanel and click on the HotLink Protection icon located under the Security category.

HotLink icon

Next, you will be prompted with the HotLink protection setup screen.

HotLink protection options

  1. Enable HotLink protection.
    If you want to change default configuration then view the options 2-6 below.
  2. URLs to allow access: – enter websites that you want to allow direct linking to your files. By default, this area should be automatically filled with your domain names.
  3. Block direct access for the following extensions (comma-separated): – here you can enter separate file extensions that you want to block direct access to.
  4. Allow direct requests – tick this box if you want to allow direct access via a browser (for example when an image is being opened directly via URL
  5. Redirect the request to the following URL: – If you want you can redirect requests that were blocked to a certain URL, for example, one of the pages on your domain name. It would need to be a valid URL in a form of
  6. Click Submit to save all your changes.

HotLink protection enabling success in cPanel

That’s it, now your files on the server are protected from being linked by unwanted websites.

IMPORTANT! If you noticed that files like images or videos stop working after you have enabled HotLink protection then make sure that your domain is added to the URLs to allow access list.


In this tutorial, we have learned how to enable HotLink protection for your website. It will save your server bandwidth from being used by someone else without your permission.

About the author

Elvinas S.

Elvinas is a senior server administrator at Hostinger. He monitors the infrastructure’s well-being and keeps the uptime at a maximum. Besides server management, web development has always been one of his biggest passions.

Add Comment

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get Exclusive Content

Join thousands of webmasters who get our free newsletter with tips on how to drive more traffic and revenue to their websites!

Please wait...

Thank you for sign up!

More in Hostinger
How to Change Your PHP Version