- Home
- Knowledge Base
- cPanel
- Security
- 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.
Introduction to Hotlink Protection
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
What is Hotlink Protection?
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.
How to Enable Hotlink Protection
- Access the Hotlink Protection Interface: From your cPanel dashboard, navigate to the “Security” section and click on “Hotlink Protection”.
![](https://imagedelivery.net/tCGYKBtl6PGSxQveibkClw/smarthost.ie/2024/05/cPanel-Security-Hotlink-Protection.png/w=9999)
- Enable Hotlink Protection: Click the Enable button to activate Hotlink Protection
![](https://imagedelivery.net/tCGYKBtl6PGSxQveibkClw/smarthost.ie/2024/05/cPanel-Security-Hotlink-Protection-Enable.png/w=9999)
- 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.
- Specify Protected Files: Enter the file extensions you wish to protect (e.g., jpg, jpeg, png, gif).
- 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.
- Redirect Blocked Attempts: You can also specify a URL to redirect users if they are blocked from accessing a hotlinked file.
![](https://imagedelivery.net/tCGYKBtl6PGSxQveibkClw/smarthost.ie/2024/05/cPanel-Security-Hotlink-Protection-Configure-Hotlink-Protection.png/w=9999)
In-Depth Guide
Understanding the Configuration Options
- 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. - 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.
- 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.
- 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.