I tried looking at similar questions on here, but they didn't encounter a problem similar to mine on FileZilla.

I create a .htaccess file and .htpasswd, put it into the folder with all my files, and when I go onto the public host server site with all the directories, my one becomes completely invisible. I want it to be visible, but I need it to prompt for a username and password. Here is the code I used:


AuthType Basic
AuthName "Password Restricted Area"
AuthUserFile http://domain_name_of_server/2015/student_number/name_of_directory_folder/.htpasswd
require valid-user

.htpasswd layout:


What could the problem be making it invisible? And how could it be fixed so it prompts for a password?

  • Once there, make sure you tell them what does it mean "in FileZilla"? FTP or SFTP protocol? Did you try another client (of the same protocol)? A log file (=real log file, not message log from GUI) can be useful too. Dec 20, 2015 at 15:58

1 Answer 1


Your .htaccess file is blowing up the directory because your AuthUserFile location is incorrect. AuthUserFile expects a file path, not a network location: https://httpd.apache.org/docs/2.4/mod/mod_authn_file.html

  • How can I locate my file path for my FTP folder?
    – Filip
    Dec 20, 2015 at 22:11
  • You can specify the path relative to the htaccess file.
    – Evan
    Dec 21, 2015 at 0:04
  • Yes, but how can I find the name of that path?
    – Filip
    Dec 21, 2015 at 0:25
  • Hard to answer--it all depends where you created the htpasswd file.
    – Evan
    Dec 21, 2015 at 0:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy