“NO Hotlink” – Protect your website from hotlinking with htaccess

January 6, 2008

If you have a website running on Apache and Linux System, you can disable hotlinks.

Hotlinking is when a website or blog use your image with a direct link, so result a consuption of your website bandwith. I assume that I’ve posted a photo of 2MB on my blog and people use it on their webpage without reuploading my photo on their host. Posted Photo was viewed 200 times in 1 hour and consume 400mb of traffic only in 1 hour!! In a day became 9.6 GB of traffic and for website that hosted this photo not is good. Also, there are other many reasons to block hotlinking but this article would be only a solution to prevent hotlinking.

First of all you have to upload one image called no_hotlink.gif on your images directory of your website. (this image is attached below)

No Hotlink

(more…)

Apache – Alias Configuration with ServerAlias

December 13, 2007

What is Alias?

Alias is an alternative name to delivery a domain name. For example we have www.smokinglinux.com domain name configured correctly in our apache configuration files and we want other domains linking directly on our master domain or subdomains linking on www.smokinglinux.com. To know better this tutorial you have to see a configuration sample attached below:

NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
ServerName www.smokinglinux.com
ServerAlias smokinglinux.com web.smokinglinux.com
DocumentRoot /var/www/smokinglinux.com
</VirtualHost>

(more…)