I would like to know if it is possible to protect some sections of the site with an htpasswd or not? I know that I could protect it by using user groups in my template, but I'm looking at avoiding the cost simply because the site is very temporary (1 week) and not for external purposes.

So basically,




Those 3 sections would be protected by a different password, but they would also be pages in my site. Can I just create the real physical folder and create the same page with same url in Craft? Is there a way to achieve this?


1 Answer 1


Using htaccess/htpasswd in each folder does work, but I don't find it really elegant. Would there be a better way of doing this without Craft's users?

  • 1
    Either htpasswd or enforcing it at the Craft template level seem pretty straight forward to me.
    – Brad Bell
    Commented Jan 23, 2017 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.