How to configure hotlink protection in cPanel

This article describes how to configure hotlink protection in cPanel. By enabling hotlink protection, you can help prevent other web sites from using your web site's bandwidth.

About hotlinking

Hotlinking, also known as inline linking or direct linking, is when another web site links directly to files that are hosted on your web site. For example, another site's web page may contain direct links to image files that are stored on your web site. As a result, when visitors go to the other site's web page, your site serves the image files, and your bandwidth is effectively “stolen.”

To prevent this scenario from occurring, you can configure hotlink protection in cPanel.

To enable hotlink protection, follow these steps:

  1. Log in to cPanel.
    If you do not know how to log in to your cPanel account, please see this article.
  2. Open the Hotlink Protection tool:
    • If you are using the Jupiter theme, on the Tools page, in the Security section, click Hotlink Protection:

      cPanel - Security - Hotlink Protection icon

    • If you are using the Paper Lantern theme, in the SECURITY section of the cPanel home page, click Hotlink Protection:

      cPanel - Security - Hotlink Protection icon

  3. Click Enable.
  4. In the URLs to allow access text box, type the URLs of the web sites that can access your files. cPanel suggests local URLs automatically.
  5. In the Block direct access for the following extensions text box, type the file extensions for which you want to block direct access. Several typically hotlinked file extensions are already listed.

    Image files and other multimedia files, such as video files, are often hotlinked.
  6. Optionally, click the Allow direct requests check box.
  7. In the Redirect request to the following URL text box, you can optionally type a URL. Users from blocked sites will see this page instead of the hotlinked file.
  8. Click Submit.

When another web site no longer links directly to your files (or if you don't mind that the external web site links to your files), you can disable hotlink protection.

To disable hotlink protection, follow these steps:

  1. Log in to cPanel.
    If you do not know how to log in to your cPanel account, please see this article.
  2. Open the Hotlink Protection tool:
    • If you are using the Jupiter theme, on the Tools page, in the Security section, click Hotlink Protection:

      cPanel - Security - Hotlink Protection icon

    • If you are using the Paper Lantern theme, in the SECURITY section of the cPanel home page, click Hotlink Protection:

      cPanel - Security - Hotlink Protection icon

  3. Click Disable.

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.