Hide your website during development.

While you are developing your website, you should keep it hidden as much as possible. Both from people and from search engines.  The reason behind this is to prevent it from being indexed or linked to until you think its ready.  It isn't a good idea to let Search Engines index your website, then change the links to the pages to something you decided at the last minute.  Another potential problem is that search engines may delay their coming back to your site  if you don't have a substantial amount of content, it could take a while before you get indexed again.

Next I will show you how you can easily do this from your Dreamhost control panel. If you don't have Dreamhost then the process might be slightly different but it should be easy enough to figure it out.

Dreamhost allows you to protect your website with a username and password; multiple usernames and passwords even. Keep in mind this isn't the most secure method of protecting a website so you don't want to use this to protect very sensitive information. I use it with most of the sites I develop; having multiple usernames with their own password allows me to have different people work on the website before it is publicly available.

This method uses the htaccess file to define the usernames, passwords and sections that will be blocked off. You can protect your whole website, or you can protect only certain sections. To do this with Dreamhost, go to your control panel and find "Htaccess/WebDAV" under the "Goodies" section.

[singlepic id=60 w= h= float=]

Select the domain you want to protect, if you only have one domain then it will be shown there, if you don't see any domains yet then you need to add a domain to your account, or maybe wait a few minutes for it to appear --if you've done it just recently.

The next screen currently has one option, to "Set up a New Directory" so click on it and you'll be presented with the options to configure your htaccess. If you wanted to setup a WebDAV directory you would do it from here as well.

[singlepic id=62 w=480 h= float=]

Remember I said earlier you could block only certain sections of your website? You can specify it here under Directory name.

For example, if you want to block access to:

http://example.com/blog

and not to the entir:

http://example.com

domain, you would enter the word "blog" in there.

The next option to check is "Password-protect this dir?"
Leave the next option, "Enable WebDAV on this dir?" unchecked.
The next option is used to describe the pop-up a potential visitor might see when trying to access your site. Each webbrowser handles this differently and the only control you have is the title of the pop-up that your visitor will get.This is the pop-up where you will enter the username and password you select later on.

Some suggestions for this are listed below, it doesn't matter much, really this is just for you and whoever you share your website with before you go live.

  • Under Development
  • Restricted Area
  • Members Area

The next section is where you enter the usernames and password combinations. The format is simple, use one line for each pair, username first, then a space, then the password.

Try to make the usernames and passwords difficult to guess but easy enough for you to remember. Remember we're not trying to protect national secrets, we're simply trying to keep prying eyes and search engines out of our domain for a short period of time while we get things settled.

Use the button at the end of the form to "Configure This Directory" to save and apply your changes. As you'll be warned, this will take 10 minutes or so to complete. Let it happen and in a short while you'll have to enter the username and password you entered into the form in order to access the website.

This takes care of that "hide it" step I talk about in the previous post titled:
Writing your first blogposts

Extra resources

W3C's Protecting Documents at your website contains a section about htaccess.
Comprehensive guide to .htaccess.
Wiki Documentation on htaccess by and for Dreamhost
Htaccess tutorial For Blue Host customers
How to do this for Media Temple customers.

Do you know of a better way

Let me know in the comments.

Similar Posts