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.

Recent Articles

4 Responses to “Disable copy and right click on website or blog”

  1. Grace says:

    doesn’t work, I can still copy from my blog (blogger) – thoughts?

  2. vanezza says:

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

  3. Sudhir Shakya says:

    Yes, This code is not working. I have tried on my blog.

  4. Sudeep Acharya says:

    yes it works

Leave a Reply

Saturday 14th February 2015-Techknowl.com- Free software reviews, downloads and tech tips.