We know it all – you wrote a nice text for your website and 48 hours later someone stole it. It’s not really possible to prevent stealing at all, but we can make a bit harder for thieves. This method works for all HTML based sites, including WordPress.

You can paste the following code either in your head to protect your whole site, or in a body tag to protect only a page.

First of all use the following code, to disable copying from the page. This will however not block the right-click wich many other script do (and wich is a bad thing).

<script type="text/JavaScript">
function killCopy(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
document.onmousedown=killCopy
document.onclick=reEnable
}
</script>

This script was not written by me, all kudos to BoogieJack.com.

This script relies on JavaScript. If the user turns it off in his browser, he will be able to copy again. To prevent this, use the following code to detect if a user has JavaScript disabled and if yes redirect him.

<noscript>
<meta http-equiv="refresh" content="0; url=https://mypage.org/noscript" />
</noscript>

Be sure to place this script at the beginning of the page.

As mentioned, this will not prevent stealing at all, for example an user can just go to your sites source, but it’s a good compromise between protection and user friendliness.