
Table of Contents
Introduction
In today’s digital landscape, protecting your website’s assets is crucial. One of the common challenges faced by website owners is hotlinking—when another website directly links to your files, such as images or videos, using your server’s resources without permission. This not only drains your bandwidth but also exposes your content to unauthorized use. Fortunately, if you’re using DirectAdmin, enabling hotlink protection is a simple yet effective way to safeguard your resources. In this guide, we’ll walk you through the importance of hotlink protection and how to easily set it up in your DirectAdmin control panel.
What is HotLink Protection.
Hotlink protection is a security measure used by website owners to prevent other websites or external users from directly linking to and using their website’s resources, such as images, videos, or files, without permission. When someone hotlinks, they embed content like an image from another site by linking directly to the resource on the original server, which means the original website’s bandwidth is used whenever that resource is loaded.
Hotlinking protection helps website owners:
- Save bandwidth: Prevents other sites from draining the website’s server resources.
- Protect content: Ensures that unauthorized sites cannot use or display media or files from their website.
- Maintain control over content: Avoids unintentional distribution of media on unauthorized or inappropriate platforms.

How Hotlink Protection Works:
When enabled, the server checks the “referer” header in HTTP requests to determine where the request is coming from. If the request originates from an unauthorized domain, the server blocks access to the resource. Some websites may display a placeholder image or an error instead of the original content.
Example Use Cases:
- Preventing other sites from embedding your images in their blogs or forums without permission.
- Protecting downloadable files like PDFs, videos, or music from being shared on external sites.
Many web hosting providers and content delivery networks (CDNs) offer hotlink protection as a feature.
Step-by-Step Guide to Enable Hotlink Protection in DirectAdmin:
Log into DirectAdmin:
- Go to your DirectAdmin login page (e.g.,
https://yourdomain.com:2087
) and log in with your credentials.

Navigate to Hotlink Protection:
- Once you’re logged in, under the “Advanced Features” section, click on “Hotlink Protection”. If you don’t see it directly, you can search for it.

Configure Hotlink Protection:
- On the Hotlink Protection page, you will see several options to configure.
- Allowed Referrers: Here, you can specify which domains are allowed to link to your content. By default, your own domain should be listed, but you can add any additional domains or subdomains you want to allow.
- File Extensions: Enter the file types that you want to protect. Common extensions include:
.jpg.jpeg.png.gif.mp4.pdf.mp3
.
Any other file extensions you want to prevent from being hotlinked.- Redirect URL (Optional): You can specify a URL to redirect users to if they attempt to hotlink your resources. Some people use this to redirect to a custom error page or display a message instead of the stolen content.
Exclude Domains (Optional):
- If you have other websites that you want to allow to hotlink your content, you can add them to the list of excluded domains.
Enable Hotlink Protection:
- Once you’ve configured your settings, click Enable or Save to activate hotlink-protection.

Additional Notes:
- Caching & CDNs: If you’re using a CDN (e.g., Cloudflare), make sure hotlink protection is also enabled on the CDN side for full protection.
- Check regularly: Ensure your rules are updated, especially when adding new file types or authorized domains.

By setting this up in DirectAdmin, you’ll effectively protect your media files from being used on other websites without your permission.
Conclusion
By enabling hotlink protection in DirectAdmin, you’re taking an important step to safeguard your website’s resources from unauthorized usage. Protecting your bandwidth and ensuring that your content is only used where you intend it to be can help maintain the integrity of your site and reduce unnecessary server strain. Whether you run a small blog or manage a large e-commerce site, this simple setup will give you greater control over how your content is accessed and used across the web. Take advantage of DirectAdmin’s easy-to-use interface to enable hotlink-protection today and enjoy peace of mind knowing your site’s assets are secure.