How to Enable Hotlink Protection on DirectAdmin

What is Hotlink Protection?

Hotlink protection is a security feature that prevents other websites from directly linking to files hosted on your server (such as images, videos, or documents).

For example, if someone embeds your website’s images directly into their site, every time a visitor views that page, it consumes your server’s bandwidth, not theirs. Over time, this can:

  • Slow down your website

  • Increase your hosting costs

  • Cause unfair usage of your resources

By enabling hotlink protection, you ensure that only your own website (and any other sites you allow) can use your hosted media files.

How to Enable Hotlink Protection on DirectAdmin

1. Log in to DirectAdmin

  • Visit your DirectAdmin panel (e.g., http://da1.doveserver.com:2222/)

  • Enter your username and password.

2. Navigate to Hotlink Protection

  • From the dashboard, go to:
    Advanced Features → Hotlink Protection

3. Enable Hotlink Protection

  • Check the option “Enable Hotlink Protection”.

  • This tells the server to block outside sites from embedding your files directly.

4. Enter Allowed Domains

  • In the whitelist box, add the domains that should be allowed to use your files (usually your own domain and subdomains). Example:

    • yourdomain.com

    • www.yourdomain.com

  • If you also want to allow search engines like Google to access thumbnails, you may add their domains too.

5. Specify File Types to Protect

  • List the file extensions you want to protect, for example:

  • .jpg .jpeg .png .gif .bmp .mp4 .pdf

  • This ensures only those file types are restricted.

6. Save Settings

  • Click Save or Enable to activate hotlink protection.

  • DirectAdmin will automatically update your .htaccess or server configuration to block unauthorized usage.

7. Test Hotlink Protection

  • Try embedding one of your images on another site (or a dummy test site).

  • It should be blocked and not display, confirming hotlink protection is active.

Tips & Best Practices

  • Always whitelist your main domain and subdomains (otherwise your own website may break).

  • Avoid restricting file types like .css or .js, as it can interfere with how your site loads.

  • If using a CDN, make sure to whitelist its domain too.

Hotlink protection in DirectAdmin helps save bandwidth, secure your files, and ensure fair use of your hosting resources. With just a few steps, you can prevent others from abusing your content and keep your website performance optimized.

Watch the video below for detail: