Is there a way to make the sites/default/files/ directory and files inside it blocked for anonymous users?

Comments

stephtek’s picture

Hmm still looking for assistance on this.

francewhoa’s picture

2 options

Go to /admin/settings/file-system
Change the download method to 'Private - files are transferred by Drupal.'

or

If you use Apache webservers and you have full root access then you can create a .htaccess file with appropriate content.
Then add it to appropriate directory.
That will prevent files from being directly accessed.

Loving back your Drupal community result in multiple benefits for you