Menu
Web Host Pro logo
  • Home
  • News
  • Servers
  • Websites
  • WordPress
  • Business
Web Host Pro logo
members download
November 12, 2013September 3, 2024

How do you prevent someone from downloading your site?

Share it here

We get this question a lot and the truth is there is no 100% foolproof 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 are some tricks to get you started on how to block the downloading of your web pages.

1.  Stopping 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 hot linking with .htaccess. Again, if you are with WebHost.pro there is a 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 are 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!

Continue Reading

← .htaccess info, tricks, and tips

Connect with us

Web Host Pro

Recent Posts

  • Massive Data Center Upgrade Finished!

    Massive Data Center Upgrade Finished!

  • OpenCart vs. Shopify

    OpenCart vs. Shopify

  • How Web Host Pro Empowers Entrepreneurs

    How Web Host Pro Empowers Entrepreneurs

  • The Best Way to Drive Traffic to Your Website: A Comprehensive Guide

    The Best Way to Drive Traffic to Your Website: A Comprehensive Guide

  • Unveiling Domain Privacy

    Unveiling Domain Privacy

  • Transforming Search With OpenAI

    Transforming Search With OpenAI

  • From Zero to $10K: My Journey to Making Money Online with Affiliate Marketing

    From Zero to $10K: My Journey to Making Money Online with Affiliate Marketing

  • Unlocking Business Efficiency with AI

    Unlocking Business Efficiency with AI

  • Unlocking Your Creativity

    Unlocking Your Creativity

  • Why Remote Work in 2024 is Perfect for Aspiring Digital Nomads

    Why Remote Work in 2024 is Perfect for Aspiring Digital Nomads

  • Unleash Your Inner Lion

    Unleash Your Inner Lion

  • Building a Successful Landing Page with Web Host Pro's SiteJet Website Builder

    Building a Successful Landing Page with Web Host Pro's SiteJet Website Builder

  • Navigating the World of Business Services: Understanding Advertising, Promotion, Publicity, and More

    Navigating the World of Business Services: Understanding Advertising, Promotion, Publicity, and More

  • System Admin Services for cPanel-Based Servers

    System Admin Services for cPanel-Based Servers

  • Using FileZilla and Cyberduck with WordPress

    Using FileZilla and Cyberduck with WordPress

Log in
©2025 Web Host Pro