How to Disable Right-Click for WordPress Websites

Want to know more about disabling right-click for WordPress websites? We're going to discuss many of the aspects you'll need to consider if you want to disable right-click for your WordPress website.

If you choose to sell any digital products online, you have some unexpected situations to navigate. For example, photographers have to constantly fight against image theft. The same goes for digital artists, computer programmers, and almost anyone who chooses to sell online. The choice to disable the right-click option for a WordPress website is one many take, but it does have drawbacks.

The positives seem great on the surface, but you’ll find that they aren’t the boost you’d expect. While disabling right-click does deter lots of users, savvy thieves know how to still get at those files. What’s more, the rest of your law-abiding users will suffer through a poor User Experience (UX) that could do more harm than good.

In this piece, we’re going to discuss many of the aspects you’ll need to consider if you want to disable right-click for your WordPress website. First, let’s look into what the right-click functionality offers your users.

What Right-Clicking Achieves On a Webpage

You can consider the right-click to provide a quick access context menu. The options within this menu will change depending on what you click and other factors relating to your Operating System (OS). For example, highlighting text and opening the context menu will bring up some formatting and printing options:

A right-click context menu for text.

In contrast, right-clicking a link-based element such as a button will let you open that link within a new window or tab, save the link, and more:

A right-click context menu for buttons and links.
Right-click menu

When it comes to images, you’ll find specific context options available, one of which is to download it:

A right-click context menu for images.
How to save an image with right-click

While the right-click context menu offers lots of value, some of the options can cause problems, especially if you rely on customers for your on-site assets. We’ll talk about this in more detail next.

Why You Might Want to Disable Right-Click for a WordPress Website

If you choose to display images, graphics, and video on your site, you’ll struggle against the tide of asset thieves across the web. Using the right-click menu, it’s easy to select and save the image on display – albeit in the format you present it in. While you won’t likely display a full-sized version of the asset in question, this won’t deter theft, and could result in a lost sale.

As such, there are lots of reasons you’ll want to disable the right-click option on your site:

  • At a core level, you want to stop theft at the source, through the most straightforward method.
  • It helps protect your site, in case you use proprietary code.
  • You can also protect your hard work, effort, and profit margin.

It’s a tough ask to achieve all of this through disabling right-click. This is especially true when you consider how the legal situation doesn’t always have your back.

The Legalities of Saving Files From the Web

For absolute clarity, anyone who downloads and saves an image (or any other text or asset) from the web is stealing. The law, technically speaking, is on your side here in most jurisdictions. Of course, you’ll need to make sure that this is the case for your current location. However, the situation is more complex than treating any download as illegal.

For instance, you might enjoy free publicity from an image that goes viral. Also, if a marketer or blogger screenshots your site’s images and uses them as part of some other marketing, you might be okay with that. While the action is still illegal in a technical sense, it’s not something you’ll every pursue because you’re okay with the benefits. However, you can’t dictate attribution based on whether you like the use case or not.

Instead, it’s a good idea to add a disclaimer to your site, in order to offer a visual deterrent, if not a technical one:

A legal disclaimer on a website.
Legal disclaimer

It only needs to be simple and legal in order to get your message across. From there, you can work on disabling right-click for your WordPress website.

How to Disable Right-Click for Your WordPress Website

We’re going to offer two ways to disable right-click here, although there is no real way to do this without extra help from a plugin. However, the manual approach can solve a number of your problems relating to image theft. Let’s take a look.

Using a Manual Approach

The first method is not exactly a way to disable right clicking, but does let you stop one of the more harmful practices across the web: ‘hotlinking’. This is when you add a direct URL to an image or other asset, and you can see what this is within WordPress:

The File URL field within WordPress.
File URL field

Some users will also grab this through the Inspect dialog, or save the image direct – again through the right-click menu:

Finding the URL of an image using the Inspect tool.
Inspect tool

The big problem with hotlinking is that it uses up your site’s resources wherever this is in place on the web. This is a double-whammy, as not only does a thief have your images, but they will use your resources to display it. This can have a knock-on effect with regards to your server usage, and even expenses related to your site costs.

One solution is to disable hotlinking, rather than the right-click functionality. For this, you’ll need the following:

While using SFTP isn’t too difficult, you might want to take a refresher. We talk about using SFTP in our knowledge base article on activating Download Monitor extensions, and it’s essential reading.

Once you have these, your job is to find the .htaccess file. This lets you configure your site’s Apache server. Once you open this, add the following code to the file and save your changes:

%{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?YOUR-URL [NC] RewriteCond
%{HTTP_REFERER} !^http(s)?://(www.)? [NC] RewriteRule .(jpg|jpeg|png|gif)$ – [NC,F,L] 

This will disable hotlinking from your site, which is one step towards halting theft at source. However, to disable right clicking in its entirety, you’ll want to employ a WordPress plugin.

Using a WordPress Plugin to Disable Right-Clicking

A plugin is a typical way to add extra functionality to your WordPress website. When it comes to disabling right-clicking, it’s also a good way to implement it here too. There are very few plugins that meet our standards in this area – most have poor ratings and reviews, and don’t have regular updates. However, WP Content Copy Protection & No Right Click presents the right functionality, development attention, and user satisfaction:

The WP Content Copy Protection & No Right Click plugin.
Content copy protection

Once you install and activate the plugin, you won’t need to do any more. If you try to right-click on a site asset, you’ll see a pop-up warning and won’t be able to see the context menu:

The front end of a site showing an alert that the right-click functionality is disabled.
An alert that right-clicks are disabled

This looks like it will do the job you need, but it comes with a number of negatives and caveats – we’ll discuss them next.

Why You’ll Want to Keep Right-Click Functionality Enabled for Your Site

While disabling right-click for your WordPress website looks to be the answer to halt image theft, it isn’t. In fact, users can still get at those assets – specifically the URL – through a browser’s web development tools:

The inspect tool showing how to find the URL of an asset.
Inspect tool

What’s more, there are lots of other reasons to keep right-clicks enabled on your site:

  • You won’t really have any code to hide, and you won’t need to protect proprietary code. The reality is that nothing you create will be so unique that current developers won’t be able to figure it out.
  • Users who want to steal your assets can still do so using the Inspect or development tools menus. This means implementing a way to disable right-clicking is pointless.
  • You’ll annoy, frustrate, and even anger users who need to use the right-click context menu to browse the web. Accessibility is important, and some of those options let a user see and use your site who wouldn’t otherwise be able.

Of course, you also have the benefits that well-meaning users will provide you through right-click access. Viral images, screenshots, and more all contribute in positive ways. None of them can exist without the ability to right-click on a site element. As such, there are alternatives that might do the same job, without the need for extra code and plugins.

Alternatives to Disabling Right-Click Functionality

The running theme throughout the article so far is that disabling right-click functionality won’t stop access to your files. In this case, you’ll want to investigate what else you can do to protect your images and deter thieves. The keyword here is “deter” because this is all you can do. However, there are some methods that work well enough that it could reduce the amount of theft you see:

  • Use the lowest-quality assets you can get away with. To think of it from a different way, create assets that you don’t mind a user taking from your site. There’s a difference between a small format image with heavy compression, and a large format lossless version.
  • Add a watermark to all of your assets. This is a classic way to state that you own an image. At least, if an image ends up on another site, the watermark will display your branding in a prominent position.
  • Display a copyright notice. This is another typical approach to deter theft. Much like a disclaimer, you’ll display a copyright notice for every image on your site as a visual deterrent.
  • Add and edit your image’s EXIF data. If you work as a photographer or digital artist, you’ll know that the EXIF data contains almost everything about your file. While optimization might strip most of this away, you can add it back in to show your name, company, website, a copyright notice, or any other identifier.

Combined, these will all achieve roughly the same results as disabling the right-click option for your WordPress website. A watermark is a good option to choose. However, there’s an even better way to give users access to your files and protect your assets at the same time.

How Download Monitor Lets You Protect Files and Retain Usability

Download Monitor is the leading management plugin for your downloadable files. It works from the WordPress dashboard, and lets you organize your downloads. From there, you can display a gorgeous button on the front end for your site’s visitors.

wordpress disable right click plugin
Download Monitor

We’ll get onto what Download Monitor offers later, but it’s worth pointing out a couple of features specific to protecting your files without disabling right-click functionality. For instance, every download file has a number of options that let you set how a user accesses the file:

Download Options
Download Monitor’s download options

While there are a number here depending on whether you have a premium plan or not, the Members Only option is a powerful one. It will only let users who log into your site access the download.

You’ll also note the Redirect to file option. Download Monitor will ‘force’ downloads by default. This means you’ll click on a button, and a dialog will pop up asking where you’d like to save the file. It’s a typical way to manage downloads. However, you can also redirect the user to a folder and let them decide how to handle the download file.

We wouldn’t recommend this approach if you want to protect your files, because it will expose the URL of the asset. Instead, keep this disabled, and use the Members Only option instead.

Using Download Monitor, you can stop Google and search engines from indexing your files and allow only logged-in users, customers, or specified user roles to access your protected files.

Download Monitor

Grow your audience, track download performance, and convert your traffic into email subscribers with an easy-to-use digital downloads solution for WordPress.

As an alternative, or if you need more flexibility, you might want to look at the Advanced Access Manager extension.

Advanced Access Manager

If you’d like to manage access to downloads on a per-user basis, this premium extension will be on your wishlist. It adds another metabox to your Downloads page that lets you set up access rules for users.

The Advanced Access Manager metabox.

For example, you can choose an access group based on a user role, username, or even a specific IP address. From there, you can assign access rules to user roles, and state whether they can download files. You’re also able to set restrictions based on a number of criteria. You can set a date limit, download limit, and much more.

The Advanced Access Manager is available on our Complete plan, and represents fantastic value if you need fine-grained control over your asset access rights.

What Else Download Monitor Can Offer You and Your Users

Download Monitor is much more than an alternative is disabling right-click functionality. It can be a complete download management system for your WordPress website. Other than what you already know, the plugin can help with the following:

  • You can offer file downloads with flexibility. For instance, you can choose to offer a number of versions to download, depending on what you have saved to your server. This lets you create an archive of sorts for your downloadable files.
  • There is full customization of any interface elements, such as buttons. This means you can blend your download links into your site without the need for code.
  • You can sell your products from the Download Monitor interface, and by extension, your WordPress website.
  • You’ll have full tracking and analytics, to help you understand how users interact with your downloads. This helps you create a better experience for your visitors.

Download Monitor provides a lot under the hood, and we can’t cover it all here.

In Summary

Image theft is something you’ll run head-first into on a number of occasions. Some site owners chase their tails hunting down and trying to stop thieves, but it’s mostly to no avail. Because assets are easy to save, lots of users will do so. Of course, there are positives too, especially if a ‘screen grab’ of your site goes viral. Even so, many users look to disable right-click functionality to stop theft at source. It won’t work in most cases, because those assets still exist at the same URL, and a user can find it through other means.

Instead, the best plan is to leave the right-click functionality active, and look to other ways to protect your files. Download Monitor is the number one way to organize and offer files for download on WordPress websites. It provides a native set of options to restrict access to downloads, and also offers the Advanced Access Manager extension to do the same for user roles.

The core plugin is free forever, but a premium plan gives you access to a number of ways to enhance Download Monitor. What’s more, every purchase comes with a 14-day, no quibble, money-back guarantee!

Download Monitor

Grow your audience, track download performance, and convert your traffic into email subscribers with an easy-to-use digital downloads solution for WordPress.

Tom Rankin
Tom Rankin

Tom Rankin is a quality content writer for WordPress, tech, and small businesses.

When he's not putting fingers to keyboard, he can be found taking photographs, writing music, playing computer games, and talking in the third-person.

Start Protecting your WordPress Downloads

Protect and track downloads on WordPress... What are you waiting for?