How do you prevent someone from downloading your site?

, , , ,

How do you prevent someone from downloading your site?

We get this question a lot and the truth is there is no 100% fool proof way unless you make your page in PHP and use something like Zend, SourceGuardian, or IonCube which costs money and can be very tricky. In most cases this is not realistic to do and not necessary. We recommend not worrying about it.

After all imitation is the sincerest form of flattery.

Really though, 99.9999% of people are not out to steal your website and most new sites are just ideas of other sites compiled together with a new vision. With that said, if you’re still worried about someone using your goods then here is some tricks to get your started on how to block downloading of your web pages.

1.  Stopping the someone from seeing your site tree or file listing. With WebHost.pro there is a tool for this in your Cpanel or you can simply add this code into your .htaccess file:

Options -Indexes

or it might be:

Options All -Indexes

2.  Pay for it, there is a service that will do some crazy encoding, disable your right click, and stop view source on the site. http://www.htmlguard.com

3.  Stop image and video hotlinking with .htaccess. Again if you are with WebHost.pro there is tool to just switch this on in your cpanel or you can add this code directly into your .htaccess file in the public_html folder.

  1. RewriteBase /
  2. RewriteCond %{HTTP_REFERER} !^$
  3. RewriteCond %{HTTP_REFERER} !^http://(www.)?your-main-domain.com/.*$ [NC]
  4. RewriteRule .(gif|jpg|swf|flv|png)$ /feed/ [R=302,L]

4.  Block Evil Robots, Site Rippers, and Offline Browsers. There is better lists but this one will get you started. Note: DO NOT include the “[OR]” on the very last RewriteCond or your server will crash, delivering “500 Errors” to all page requests.

# deny access to evil robots site rippers and offline browsers
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} ^Anarchie [OR]
RewriteCond %{HTTP_USER_AGENT} ^ASPSeek [OR]
RewriteCond %{HTTP_USER_AGENT} ^attach [OR]
RewriteCond %{HTTP_USER_AGENT} ^autoemailspider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xaldon WebSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xenu [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus
RewriteRule ^.* – [F,L]

You can also include specific referrers to a blacklist by using HTTP_REFERER. We used the scumbag domain, “iaea.org” as the blocked example, and we used “your-main-domain” as your domain (the domain being blocked is:  iaea.org):

RewriteCond %{HTTP_REFERER} ^http://www.iaea.org$
RewriteRule !^http://[^/.].your-main-domain.com.* – [F,L]

We will work on updating this with more options and tricks, but for now this will get you started.

Need hosting? Check our web hosting plans here starting as low as $1.99 a month!

Post your Comments

Fill out all required fields to send a message. You have to login to your wordpress account to post any comment. Please don´t spam, thank you!

This site uses Akismet to reduce spam. Learn how your comment data is processed.