1. Home
  2. Knowledge Base
  3. cPanel
  4. Security
  5. How to Enable Hotlink Protection in cPanel on Smarthost

How to Enable Hotlink Protection in cPanel on Smarthost

This article assumes you are already logged in to cPanel. Click here for details on how to log in to cPanel, follow this guide.

Hotlink protection is a security feature in cPanel that helps you prevent other websites from directly linking to files on your website. Other sites can steal bandwidth and resources by linking directly to your images, videos, or other files without your permission. Enabling hotlink protection ensures that only websites you approve can use your content, which helps conserve your bandwidth and maintains the integrity of your site’s content.

Quick Start Guide

Hotlink protection works by blocking other websites from embedding your files. This safeguard is particularly crucial for images and videos that can consume a significant amount of bandwidth when accessed frequently. By enabling hotlink protection in cPanel, you ensure that your content is displayed only on your own site or on those you specify.

  1. Access the Hotlink Protection Interface: From your cPanel dashboard, navigate to the “Security” section and click on “Hotlink Protection”.
  1. Enable Hotlink Protection: Click the Enable button to activate Hotlink Protection
  1. Configure Access: You can then add URLs of the sites that are allowed to link to your content. Ensure these are sites you trust or own.
  2. Specify Protected Files: Enter the file extensions you wish to protect (e.g., jpg, jpeg, png, gif).
  3. Control Access: Optionally, you can allow direct requests by checking the corresponding box. This is useful for allowing images to be displayed in web searches.
  4. Redirect Blocked Attempts: You can also specify a URL to redirect users if they are blocked from accessing a hotlinked file.

In-Depth Guide

Understanding the Configuration Options

  1. Allowed URLs: Here, you list the websites that are permitted to use your content. This typically includes your own domains or subdomains. For example, if your primary site is hosted at smarthostdemo.ie, you should list it here to ensure your images are displayed correctly across your pages.
  2. Protected File Types: This section allows you to specify which types of files are protected. Common file types include images like JPEG or PNG files. You should add file types that are frequently used on your site and are likely targets for hotlinking.
  3. Allow Direct Requests: Checking this option lets users access files directly if they type the URL into their browser. This setting helps maintain user experience by ensuring that search engines and direct accesses are not penalised, while still blocking unauthorised embedded uses.
  4. Redirect the Offenders: If someone tries to hotlink to your content, you can redirect their traffic to a different URL. For instance, you could redirect them to a warning image or a ‘content theft’ notice page, which can deter theft and inform the offender of the violation.

Examples of Usage

Imagine you operate a blog hosted on Smarthost with valuable infographics. By enabling hotlink protection and specifying file types like PNG and JPEG, you ensure that other sites cannot leech off your server resources by linking directly to your images. Instead, they are redirected or denied access, depending on your settings.

Official Documentation

For more detailed technical information, you may refer to the official cPanel documentation on Hotlink Protection.

Conclusion

Activating hotlink protection in cPanel via Smarthost not only optimises your website’s resource usage but also secures your content from unauthorised use. By following the steps outlined above, you can protect your media and improve your site’s overall performance and security.

What is hotlink protection?

Hotlink protection is a security measure implemented in cPanel that prevents other websites from using your bandwidth by directly linking to files on your site. It is commonly used to protect images, videos, and other media files.

Why should I use hotlink protection?

Using hotlink protection helps conserve your site’s bandwidth and prevents potential misuse of your media resources. It ensures that only approved websites can display your content, which can also protect the integrity of your brand and copyright.

How do I enable hotlink protection in cPanel?

To enable hotlink protection, log into your cPanel dashboard, navigate to the “Security” section, and click on “Hotlink Protection.” From there, you can configure the settings to suit your needs, such as specifying which sites are allowed to use your content and which file types to protect.

Can I allow specific sites to hotlink my content?

Yes, you can specify which websites are allowed to link to your content. In the Hotlink Protection interface, you can add the URLs of the sites you trust or own to the list of allowed URLs.

What types of files should I protect with hotlink protection?

You should protect file types that are likely to be hotlinked and can consume significant bandwidth, such as images (JPEG, PNG, GIF), videos, and audio files.

Does enabling hotlink protection affect my SEO?

Allowing direct requests can help mitigate any potential negative effects on SEO. This setting enables access to files when the URL is entered directly into a browser, which includes access from search engines that might index these files.

What happens if someone tries to hotlink to my protected content?

If someone attempts to hotlink to your content, their request will be blocked, and depending on your settings, they might be redirected to another URL of your choosing. This could be a custom message or an image indicating that the content cannot be accessed.

How can I see if my hotlink protection is working?

You can test hotlink protection by trying to embed your protected content on a website not listed in your allowed URLs. If the protection is active, the content will not display on the unauthorised site.

Can I disable hotlink protection if needed?

Yes, hotlink protection can be disabled at any time through the same interface where it was enabled. Simply access the Hotlink Protection settings in cPanel and turn off the feature.

Where can I find more help with hotlink protection?

For further assistance with hotlink protection, please consult the Smarthost Knowledge Base or contact our support team. You can also refer to the official cPanel documentation for more technical details.

Was this article helpful?

Related Articles

Go to Top