How-To prevent people from stealing your files & bandwidth (hotlink)

If you find that people are stealing your files or using your bandwidth tehn you can prevent this with a Hotlink. A hotlink is a direct link that embeds a file (such as an image or video) from your site into another website. When other sites embeds your files, they are using your bandwidth to serve those files. DirectAdmin allows you to prevent hotlinks to your site by using the .htaccess file.

 

Create an .htaccess file in your public_html directory with the following code:

Make sure to replace domain.com with your actual domain name.

 

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?domain.com.*$ [NC]
RewriteRule .(gif|jpg)$ - [F]

 

 

Was this answer helpful?

 Print this Article

Also Read

How to Redirect Non-WWW to WWW

The easiest way to redirect domain.com to www.domain.com on the url address bar whenever someone...

How To Setup Free SSL Certificate

To setup your Free Let's Encrypt SSL Certificate follow the procedure below:1. First goto to...

How do I addon to my Hosting Package/Plan?

Yes, if you wish to add addtional options or addons to your Hosting account you can do so at all...

Running Scripts

If you are having troubles with Perl CGI or PHP scripts please read the following...

How can i upgrade or downgrade my Hosting?

Upgrading is a simple procedure from the Client Portal that you can do yourself at anytime. When...

Powered by WHMCompleteSolution