Protection Digital products

I discovered that all my digitals products (PDF files) were indexed by Google. So, I could find my “hard work” for free on Google. You could also see the address of the files.

The files were stored in the folder /wp-content/uploads/year/month. This is the default setting for the media library and the default location for the uploaded digital products.

These are default settings and I did not change anything.
I knew that when you know the exact file address of a digital product that you were able to access it.

My solution:
- I copied all my digital products to a new directory and deleted the old files from /wp-content/uploads/year/month.
- In robots.txt I made the rule: “Disallow: /wp-content/new directory name/” to prevent search engines to crawl this directory.
- In my new directory I put a htaccess file with:
order deny,allow
deny from all
allow from none
- I changed in all products the download location
- Gave myself a coupon code of 100% discount and tested or I was able to download the digital products.

My Questions:
- Is this normal or is this something what has to do with server settings and file permissions?
- Is it possible to store the files of digital products on a different location then the standard location using the possibility “ Product upload/ upload file” in the product description?

My results:
The old indexed files by search engines are not accessible anymore.
The files are also not accessible anymore when you know the exact file address
All my digital downloads are now on one location and not spread in the wp-content/year/month structure.

Please some feedback

Ella