WooCommerce offers a quick and easy way to sell digital products online. You don’t need to care about shipping and inventory anymore. However, digital piracy becomes a constant threat that you have to deal with. You’ve gotta to protect your file download links otherwise it will be extremely easy for others to steal your digital products – be it music, software or ebook files. In this article, we are about to give you a simple step-by-step process of how you can protect your WooCommerce digital products from piracy.
WooCommerce File Download Methods
There are 3 file download methods provided by WooCommerce, namely “Force Download”, “X-Accel-Redirect/X-Sendfile” and “Redirect only”. Among them, “X-Accel-Redirect/X-Sendfile” is the most reliable method as your files are not only served directly to your customers but also protected by a .htaccess file, making it really secure. However, this method requires your server to support and enable “X-Accel-Redirect/X-Sendfile” module. Unfortunately, most shared hosting providers don’t.
Using “Force Download” is another safe option to protect your downloadable files but it comes with another drawback too. Your customers won’t be able to download if your files are too big. Many users experience timeouts during download when the file size is 16MB and above.
The last, least secure yet common option left is “Redirect only”. This method redirects users to the actual file location so it works no matter how big your files are. The biggest drawback is that users can see your file download link (URL). Anyone with the link could simply access and download your valuable files.
WooCommerce Issues & Solutions
Currently, there are a few problems with WooCommerce digital product files. Among them, the biggest loophole happens with guest purchases who can just share their order URL with anyone after purchase.
That’s when our Prevent Direct Access Gold WordPress plugin comes into handy. Rather than providing the original – publicly accessible file URL to your customers, you protect them with our plugin and use their protected URL on your WooCommerce product instead.
Prevent Direct Access Gold Solutions
Both solutions block Google and other search engines from indexing your WooCommerce product files. In other words, they won’t be able to find your product files on search results anymore.
#1 Using Private URLs
This method prevents direct access to your WooCommerce product files (URL). It doesn’t require users to log in to download the files, and so, is best suitable when you allow guest purchases.
Step 1: Change WooCommerce “File download method” to “Force Downloads” Under WooCommerce > Settings > Products > Downloadable products
Step 2: Protect your product files under Media library
- Set its File Access Permission to “admins”
- Create a private URL for each file (without any download limit and expiry)
Step 3: Copy that private URL and put it on “File URL” field on your WooCommerce product instead of its original URL
#2 Using Protected URLs with Proper File Access Permission
This method forces users to log into your website before they can download your product files. It means users cannot share your downloadable file links with others.
Here are the 3 simple steps:
Step 1: Change WooCommerce “File download method” to “Redirect Only” Under WooCommerce > Settings > Products > Downloadable products
Step 2: Protect your file and set its File Access Permission to your customer role, together with admins.
Step 3: Under your WooCommerce product, click on “Choose file” and select your protected file.
Please note that once protected, the file URL is automatically updated with “_pda” on the slug. You don’t have to do anything else.
Here you go. Now everything will be working as usual just that your customers will have to log in to download your digital product. In other words, they cannot share the download URL with others as before. Your downloadable files are now much more secure!
Other Possible Solutions
You may want to take a look at our Shared Private Links which help you track different users’ download limit and expiry just by one link.
Alternatively, protect and offload your product files to Amazon S3; then serve the file download with Amazon S3 signed URLs to protect your digital products. This method is more scalable providing faster download speed and better user experience to your customers.