a yellow computer mouse icon on a light blue background. a bubble with an X inside is on the right side of the mouse

How to Disable Right Click on Your WordPress Website

You work hard on the code, content, and imagery used on your website. Unfortunately, the ability for anyone to harvest that information is just a right click away.

Because of this, many site owners will disable the end user’s ability to right click on site elements in an attempt to better protect their content.

In this post, we’ll cover:

Why Disable Right Click on Your Website?

Sites with original content, like photography sites and designer portfolios, build their success on the high quality and uniqueness of the content they produce. So, the idea that anyone visiting a site can steal that content and imagery to use for their own purposes without paying for it can be frustrating.

Disabling right click helps protect your original photos, graphics, illustrations, videos, and other media files from being harvested by those who would use them without permission.

Disabling right click for your content can also help prevent plagiarism. Because it’s much harder for users to manually copy your text word-for-word, they’ll be more likely to use your content as a source for information and paraphrase it in their own words. 

This can also save your search engine rankings as Google will drop the rankings of sites that show duplicate content. So, if someone copies an article from your site and reposts it elsewhere, Google might see this behavior as a way to manipulate search engines and reduce your site’s ranking. 

Typically, this will not happen as long as your site was properly indexed by search engines before your content was copied, as the search engine will recognize your content as the original source. Still, the possibility of penalization remains.

While workarounds that allow tech-savvy users to harvest your content even after you’ve disabled their ability to right click do exist, this small action can dissuade the average user from collecting your branded imagery and content without permission.

Does Disabling Right Click Affect SEO

In short, no, disabling right click will not affect your SEO. 

The slightly longer answer is that disabling right click has no effect on your site’s content other than to give it a base level of protection against those who would manually mine your content. It does little to affect your site in any other way. 

In fact, as John Mueller, Google Search Advocate, hinted in this 2017 tweet, disabling right click will not affect your SEO, but it also won’t do much to deter those who are intent on stealing your content. 

tweet reply from Google Search Advocate John Mueller replying to a Twitter user who asks if disabling right click will affect SEO performance. His response: That's a bit obnoxious & useless (easy to do it anyway), but doesn't affect SEO.

While the average internet user may not be technically proficient enough to steal your content if right click is disabled, there are plenty of strategies to work around and gain access regardless. 

Because of this, the best way to protect yourself against content theft is to both disable right click and register a copyright for any original content you want to safeguard.

How to Disable Right Click in WordPress

The two most common ways to disable right click in WordPress are to install a plugin or edit your site’s code.

Use a Plugin to Disable Right Click in WordPress

There are a few plugins available in the WordPress Plugin Repository that make it easy to disable right click across your entire website. Here are five of our favorites.

Remember to make a backup of your site and test all changes and new plugins in a local development environment before deploying changes to your live site.

screenshot from Disable Right Click for WP plugin in the WordPress Plugin Repository

Disable Right Click for WP

This plugin disables right clicks to prevent cut, copy, paste, save image, view source, and inspect element actions for front end users. It also disables the ability for users to highlight text or drag-and-drop images, and it’s entirely free.

screenshot from Disable Right Click Images plugin in the WordPress Repository

Disable Right Click Images

This plugin will only disable right click on images across your site, leaving the functionality for end users to right click and view your source code or highlight and copy/paste text. It’s great for sites with lots of imagery but less of a focus on unique copy.

screenshot from Disabled Source, Disabled Right Click and Content Protection plugin in WordPress Plugin Repository

Disabled Source, Disabled Right Click and Content Protection

This plugin disables right click functionality, but it also disables common keyboard shortcuts your visitors might use to circumvent disabled right click functionality, including source (Ctrl+U), F12 function key, and save the page (Ctrl+S) shortcuts.

screenshot from Content Copy Protection & Disable Right Click plugin in the WordPress Plugin Repository

Content Copy Protection & Disable Right Click

This plugin will disable right clicks and the copy/paste function on your site and display a “disabled” message when the front end user attempts to use these functions. It also disables common keyboard shortcuts such as CTRL+C, CTRL+X, CTRL+V, CTRL+U, ⌘+C, ⌘+X, ⌘+V, ⌘+Option+I, and ⌘+Option+U.

screenshot from No Right Click Images Plugin in the Plugin Repository

No Right Click Images Plugin

For image-heavy sites that don’t require a lot of unique text, like photography sites or eCommerce sites, the No Right Click Images Plugin can help deter image theft. The plugin owners do warn that this plugin can, on occasion, interfere with clickable images, so make sure to test this plugin in a local development environment before implementing it on your live site.

Add Code Snippets to Disable Right Click in WordPress

Disabling right clicks in WordPress is as easy as opening and making a small edit to the functions.php file of your theme. We recommend using a local development environment, such as Local, when making any widespread changes on your site to avoid disruptions or unintended consequences in production.

Once you’re working in a safe environment, you can use these steps to disable right click with PHP code:

  1. Log into your WordPress dashboard.
  2. From the left sidebar, click Appearance > Theme Editor.
  3. In the Theme Editor, find and click on the functions.php file in the right-hand side.
  4. Add the following code to the end of the file:
function disable_right_click() {
    echo "<script>document.oncontextmenu = function(){return false;};</script>";
}
add_action( 'wp_footer', 'disable_right_click' );
  1. Update the file to save your changes

Please note that this code may not work to disable right click on all browsers and devices, and users will still be able to access the right-click menu using keyboard shortcuts.

Alternative Solutions to Protect Your Content

There are a few other strategies you can implement to protect your content from those who would harvest it without your permission.

The first and most effective way to protect your content is to add a copyright tag. This will make it easier for you to challenge those who would copy your original content and give a legal standing on which to build your case.

Remember, simply adding a copyright tag alone may dissuade someone from stealing your work, but it’s ultimately useless unless you have actually registered your work. For U.S. companies, you can learn more about how that process works here or get straight to registering your content here.

You can also use a tool like Copyscape to monitor the web for unauthorized copies of your work. Copyscape provides a free plagiarism checker, and the premium version even comes with a WordPress plugin for your website. The plugin adds a “Copyscape Check” button to your interface that allows you to check your pages any time and provides a full report of any duplicate content found.

If you’re not ready to go the copyright route just yet, simply adding a watermark to your original imagery can dissuade potential content theft. A watermark is 

Finally, one easy way to find out if your content is being used without your permission is simply to search large portions of your text or do a reverse image search for your original images to check for copycats. 

Unfortunately, these results may not identify all instances of image theft, especially for pages that haven’t been properly crawled or indexed, but it’s still a good first step in your fight against intellectual property infringement.

Conclusion

Disabling right click functionality on WordPress is one easy way to deter content theft and help protect your WordPress site. The best way to protect your site and its content is to register copyrights for your original content and choose a high-quality WordPress hosting provider with a proven track record of top-notch security

Find out more about industry-leading WordPress hosting, including award-winning 24/7/365 support at WP Engine.  

Get started.

Build faster, protect your brand, and grow your business with a WordPress platform built to power remarkable online experiences.