Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

password protecting a sub category not working

Discussion in 'General Discussion' started by basslion, Sep 15, 2016.

  1. basslion

    basslion Registered

    Joined:
    Jul 8, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Markham
    cPanel Access Level:
    Website Owner
    In CPanel i have setup password protection via "Directory Privacy". I have a website which is live and within the root folder i have a subcategory which i am trying to password protect.

    I open Directory Privacy and go to Public_html and then click back and then go to the subcategory and then i set the name and check password protect this directory and i add a username and password.

    The padlock shows in the tree showing the subcategory is protected, however when i go to the url/subcat it just returns a 404 error page from the root website. If i take password protection off, i can then access the subcategory fine.
     
  2. kdean

    kdean Well-Known Member

    Joined:
    Oct 19, 2012
    Messages:
    285
    Likes Received:
    20
    Trophy Points:
    18
    Location:
    Orlando, FL
    cPanel Access Level:
    Root Administrator
    The root level of your account is not publicly accessible via your browser. If you only have the one site, then everything should be within the public_html folder, so create your subfolder inside the public_html folder and then set the directory privacy.

    You can have a folder outside the public_html folder accessible if you created a sub-domain or add-on domain and pointed to a folder not located within public_html.
     
    cPanelMichael likes this.
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,827
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Yes, as mentioned, the subdirectory should reside within the public_html directory unless it's document root is configured otherwise.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice