Skip to content


Support centre

Password protect your site using an .htaccess file

You can easily password protect one of your folders/directories by adding a .htaccess file.

Firstly, you need to create a file called ".htaccess" and upload it into the folder you wish to protect. You will have to name it .htaccess.txt (save it as a text file) and the rename it to just .htaccess when it is up on the server.

1.) Open text editor such as Notepad and enter the following text;
AuthUserFile /path/to/your/files/.htpasswd
AuthName "Admin Area"
AuthType Basic
require valid-user

where  "Admin Area" is replaced with the description of the directory e.g "My Admin Area" or "Members Area"

2.) Save the file to your computer as a .txt file and name it .htaccess.txt.

3.) Upload this file into the folder/directory you wish to have protected. So if you want www.yourdomain.com/admin protected then place the file inside this folder.

4.) Once on the server side rename this file by removing the .txt part so the file is called .htaccess.

5.) You will then need to create the passwd file referred to in the first line of ".htaccess" file.

6.) You can use this tool to encrypt a username and password and then just copy and paste the results into your passwd.txt file in notepad. Upload the password to the place you specified in the first line of your .htaccess file and rename by deleting the .txt.

7.) Bingo! Your directory should now be protected. To add multiple users just add them to the .passwd file on a seperate line.

Email us

support@globalgold.co.uk

Call us

0845 250 8007

Service Issues

Any current service issues are available to view in an RSS feed.

Out of hours

For server reboots or emergency issues please contact our NOC.

If you can't find what you need in our knowledgebase, please email support. The support team handle email queries from Monday to Friday between 8.00 and 17:30. You can also contact us by phone.