How to prevent from copying my website?

Dear all friends :
i want to know what should i do that my website files do not copy by anyone ?
as you know there are lots of software that copy hosted files of the website in the server !!! even you can download all HTML / ASP / JS files from one website with all details just by these kind of ripper software !?
but well known websites safe themselves from being copy by them .
so is there any idea that help me ?

Really? As far as I know, what you can see with your browser, you can copy.

‘can’ as in: tecnically capable, not as in: allowed to

They use legal means.

There is no way to prevent a web site being copied because you have to allow the browser to copy it to your visitor’s computer in order that it can be displayed. Once someone can see a web page they already have a legal copy on their computer. It is only if they then decide to use that copy for something other than viewing the page that their use becomes illegal. Software cannot detect a person’s intentions.

yes you are right but my aim is a bit different , for example one of my website have about 200 main pages if you want to copy it so you have two ways :
first you can visit all 200 pages and when your browser cashed them then you will get them . can download my website files from the server by some software .
as you know the second way is reasonable .
but my question is how to prevent users from grabbing my website when they use the second way ! if you test some of software website ripper you will understand that how much it is easy to download a full website !
anyway there are some giant and well-known website that prevent you to download and copy their website like !
but others allow you !
so how can i prevent this for my website ?

You could try adding the useragents for those ripper programs to your .htaccess file to block those specific useragents being able to access your site at all. Be careful what ones you block though because their activity looks exactly the same as what the search engine spiders do in order to examine your site so as to add the pages to their search results.

Dear Stephen thank you so much for your information , but would you PLS explain more about it , or give us an example or some kind of codes that could be written in .htaccess to prevent from copying ? due to i’m not as expert as you .

This link with code can help prevent users from right clicking on a web page. This can stop them from copying and pasting text

And this code will help prevent pages from disallowing right click.

// ==UserScript==
// @name          Anti-Disabler
// @namespace
// @description   restore context menus on sites that try to disable them
// @include       *
// ==/UserScript==


with (document.wrappedJSObject || document) {
    onmouseup = null;
    onmousedown = null;
    oncontextmenu = null;

var arAllElements = document.getElementsByTagName('*');
for (var i = arAllElements.length - 1; i >= 0; i--) {
    var elmOne = arAllElements[i];
    with (elmOne.wrappedJSObject || elmOne) {
	onmouseup = null;
	onmousedown = null;
	oncontextmenu = null;


There isn’t actually much use for that userscript (at least not exactly as coded) since the two browsers where it would work are Firefox and Opera and both those browsers have a better way of overriding any attempt to block access to the context menu.

In Firefox go into the Tools menu and then Options and on the Content tab press the Advanced button and confirm that the option allowing JavaScript to Disable or Replace Context Menus is unchecked.

In Opera go into the Tools menu and then Preferences and on the Advanced tab select Content and then press the JavaScriipt Optiions button and check that the option to Allow scripts to detect context menu events is unchecked.

For Internet Explorer, Safari, and Chrome you could use a bookmarklet version of the code to add an entry to “Re-enable Context Menu” into the browser Favorites/Bookmarks menu so you can override “no right click” scripts on a page by page basis.

With Internet Explorer 6+ and the IE7Pro plugin you could add a slightly modified version of that userscript into the browser (as the userscript option in IE7Pro uses a slightly different format to what Firefox/Greasemonkey and Opera use). There are other plugins that allow userscripts to be added to IE but that’s the only one of the three or four that I tried that actually works properly.

Do not put it online. That is all there is to it.

Dear friends this subject is not for disabling right click on the website !?
this subject is to prevent from ripping , copying whole website by some famous software .
FELGALL could you tell us what we should write in .htaccess file ? how could we limit others by this ?

He is referring to software like WinHTTtrack.

There is an easy way around it. On some posts, it does not need to be every post, just include a simple copyright statement, such as:
By [my name], ©[]

Quite simple and if anyone starts bulk copying your posts they are going to be displaying that copyright statement on their site. Not only showing they are copying your work, but also telling people where to go for the original work.

First, let me apologize for resurrecting this old thread, but it deals with an important issue that I have been researching. Specifically: How to stop someone from right clicking to “stop them from copying and pasting text.” More specifically I am trying to solve the following problem: Suppose one wants to post copyright material on the web so that people can see or read it on a web page, but NOT copy or print it because you want them to buy it, for example, in an e-book; How can one technically prevent people from copying or printing this copyright material that they view or read on a web page? I think I have seen this on Google Books and other web sites that allow you to browse substantial portions of entire books but you can’t copy or print what you see on the web page. How is this done? Thanks, for any help. Since this is an old thread, I am going to start a separate thread on this issue. I am new to this site and am not quite sure which is the correct procedure; If anyone comes back here, please address my question here or at the new thread, as is appropriate per proper forum etiquette.

Please continue the discussion in