How to Password Protect a Folder on Your Hosting Account

by | Jan 29, 2013 | 0 comments

The following files have to exist in the root of the folder you want to password protect:

  • .htaccess
  • .htpasswd

Contents of your .htaccess file

The following lines need to go into your .htaccess file

AuthType Basic AuthName “restricted area” AuthUserFile /path/to/the/directory/you/are/protecting/.htpasswd require valid-user

.htpasswd Username & Password Generator

Use this useful password generator for your .htpasswd file: pwd generator. Simply fill in the fields and then copy/paste the result into a .htpasswd file.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

elan creative

We’re like the in-house website design and support team you always dreamed of, able to tell your story like nobody else, and focus on your bottom line along with you….

Elan Creative
hello@elancreative.studio

freelance-website-designer s

QUOTE

Get a free quote for your website design project:

Privacy Overview
Elan Creative webdesign Haarlem

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Strictly Necessary Cookies

Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.