Disable copy and right click on website or blog

Plagiarism is one big issue when it comes to online business. No matter what you do, it’s a trait of some people who couldn’t control themselves from copying others work. They use manual copy-paste methods and auto-blogging to build spam sites. Here in this article, I’m going to explain a trick that could help you preventing plagiarism from your blogs/site by disabling the copy-paste functionality. This script has some disadvantages too. It blocks every action of copying from a website- so in effect your loyal readers may find it difficult to use the site content properly.

When you include the following JavaScript in your website template file, it disables the right click function on your browser. That means it become impossible to use the copy-paste function in the context menu. You can use this method in any website or blog. If you’re using Blogger enter the code in your template HTML editor section as shown below.

In Blogger, open Layout and then select edit HTML.

disable copy or edit in website or blog using JavaScript

disable copy or edit in website or blog using JavaScript

Paste the following the JavaScript code just below <head> tag as shown in screenshot.


<!-- Disable Copy and Paste--><script language='JavaScript1.2'>function disableselect(e){return false}function reEnable(){return true}document.onselectstart=new Function (&quot;return false&quot;)if (window.sidebar){document.onmousedown=disableselectdocument.onclick=reEnable}</script> 

In a WordPress blog, you can paste this code in the footer.php page or header.php using the inbuilt theme editor. Although it’s a quick and easy method to disable copying or right click on your blog it isn’t that reliable. Anyone can revert the changes made by this script by disabling the JaavScript function from browser settings.

This entry was posted in Uncategorized by . Bookmark the permalink.

4 thoughts on “Disable copy and right click on website or blog

  1. Is there any code to disable CTRL+V in a blog or website using javascript. I’ll be looking forward to your answer. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *