How to Disable Mouse Right Click on WordPress or Blogger Website

Friends, if you write an article for your website or put in a lot of effort to code and build your website, would you want someone else to copy your article and put it on their website? I understand that if you’re putting in hard work to write an article or customize your website, you certainly wouldn’t want someone else to take advantage of your efforts for free. (Disable Mouse Right Click)

In the world of the internet, countless people engage in the practice of copy-pasting. Their job is essentially to undermine the hard work of others. Such individuals scour the internet for articles and, if they find any, they simply copy and paste them onto their own websites. While this may not directly harm you, it’s crucial to safeguard your website completely from such activities to prevent unauthorized use.

How to Protect Your Website Content

Friends, there are many tools available on the internet to protect your website. Some might be free, while others may require payment. However, today I’ll share with you a method that doesn’t require you to spend money or extensively research online.

If someone has already copied the content from your website, you can file a complaint with Google Search Engine or have that website removed from search engine results.

Friends, how do you inform the Google search engine that your website’s content has been stolen? I have written an article on this topic. You can read our previous post and learn how to protect your website.

Disable Right-Click on WordPress or Blogger Website using JavaScript

Friends, as discussed earlier, if your website’s content has already been copied, you need to know how to remove it from search engines. Additionally, if your website’s content hasn’t been copied yet, you should take steps to prevent it from happening in the future. To achieve this, whether you’re using WordPress or Blogger, you can incorporate a small JavaScript code into your website to disable the right-click function of the mouse. This prevents anyone from easily copying content from your website or claiming it as their own.

I won’t claim that this method will fully protect your website, but it certainly reduces the likelihood of content copying. When we implement the context menu code on a website, it disables the right-click function for visitors, making it harder for them to copy content from your site.

JavaScript Context Menu Code

window.addEventListener(‘contextmenu’, function (e) {
// do something here…
}, false);

Friends, you can either copy the JavaScript code provided above or download it. Then, go to your website’s HTML body and paste this code there. Once you save it, the code will start working, and visitors won’t be able to easily copy your content.

How to Use Context Menu Code in Blogger or WordPress

Friends, whether you are using Blogger or WordPress, adding this code to your website is quite simple. If we talk about WordPress, you can install a plugin called “Header and Footer” and then go to the plugin settings. In the plugin settings, paste the context menu code that you copied from our website into the “Body” section, then save it. The code will start working immediately after saving.

Alternatively, for WordPress websites, you can also go to the “Theme Editor” and paste this code in either the HTML body or HTML header section. The code will function properly in either location.

Now, if we talk about Blogger, you cannot install plugins. However, you can still add this code by going to the “Theme” section and accessing the HTML editor. Paste the code there, and it will start working.

By following these steps, you can easily implement the code to prevent content copying on your website, whether you are using Blogger or WordPress.

Leave a Reply