Re: Password Protected Directory Won't Prompt for Password - 404 Instead


I have WordPress set up to pull from a sub-directory. 

Instead of, it pulls from

The index.php file re-routes the file locations so that my secure folder

is being searched for at

Hence, the 404 error. 


I called GoDaddy again. This time, the tech actually wanted to help, unlike the one I talked to before. This helpful one disabled the index.php, and tried again. The password protection worked. He recommended that I move the protected file to the /sandbox folder.


Additional Step Needed is explained here: due to a conflict between cPanel .htaccess (on Apache) and Wordpress 404 handling.

  • Add a line to the .htaccess: 
    • ErrorDocument 401 /401.html
  • Create a file in your corresponding to the location you listed above: 401.html
    • The file can have any text:  
      PASSWORD PROTECTED FOLDER - Please enter the correct username/password.

Finally, it works!