Password-Protect iWeb Sites

The ability to password-protect iWeb-Sites is only available to those that publish to .Mac. Even though iWeb does not offer this ability to those who publish to a folder, it does not mean that it is not possible. This tutorial will show you how to easily protect your site with a password and an username.

For this tutorial, we will be using a free application called iTweak. It has been made to simplify such additions to the iWeb application and so it is just perfect to use.

Please note that this tutorial is only available to those who publish to a folder and upload to a server that is capable of running .htaccess files. Please ask your hosting service first before you start this tutorial.

View a the final result (a demo) here or get right started.

  1. As stated earlier, you will have to have downloaded the latest version of iTweak (this tutorial requires at least version 1.4.7). Publish your site from iWeb as well.
    To protect your site, you need to have a password, a username and the absolute path to another file (more on that later).
  2. We will start off with the login data.
    htAccess, the method for the password protection, requires the login data to be encrypted. .
    To encrypt your login data, visit this site. Enter your username and your preferred password into the two provided textfields. For this tutorial I will be using “Hello” as my username and “World” as my password. See this example:

    Click “Create Password” and continue to the next step.

  3. Now you will get a page with your username and you password jammed between two dark blue bars. It should say your username and then a combination of weird letters and symbols separated from the username through a colon.

    Copy this whole encryption and get ready to paste it into iTweak (Shortcut: Apple + C).

  4. Open up iTweak and navigate to the “Security” tab. Tick the option to password-protect your site and in the text-field labeled “Login Data” paste in the encrypted data from the previous step. Make sure you copy/type this password 100% correctly!!!
    You can now type in your username in iTweak as well. Your window should now look something like this:

  5. Now we have to deal with filling the last text-field; the absolute path to the .htpasswd file. There are two options to solve this. Either you can use a file I made to easily get the absolute path (requires a PHP-capable server) or you have to contact your hosting service and ask them about the absolute path.

    » Option A: Go ahead and download this file. Place the file named “info.php” inside the published folder from iWeb. Upload the whole folder (or just the contents, depending on how you like it) to your server. Now visit the file in your browser by typing a URL similar to this:

    http://domain.com/Sitename/info.php

    or if you only upload folder contents then type something similar to this:

    http://domain.com/info.php

    When you view the file you should find a huge blue table outlining all sorts of geeky stuff. Search for “SCRIPT_FILENAME” and to the right of that you will see the absolute path to the “info.php” file.
    Now copy the whole path except for the first slash and the “/info.php” extension:

    » Option B: If you server does not support PHP, then simply contact your hosting provider and ask them for the absolute path to be used inside your .htaccess file. They will know what your talking about.

    In both cases, please note that the path varies from each person! There is no scheme or pattern that you can follow.

  6. Having acquired the absolute path in the previous step, copy and paste it into the provided text-field in iTweak. See this image:

  7. Now choose your published site by hitting the “Choose Published Site” button and then hit “Process Site.” iTweak will now protect your site with the 100% secure .htaccess method. It will create two invisible files that you won’t see in the Finder. If you upload your site to your server by simply grabbing the whole published folder, then thats fine and the protection will work fine. On the other hand, if you just upload the contents of a published folder, then you have to use something like Coda to view invisible files in your Mac and make sure they get uploaded as well!
  8. Done! The next time you publish, simply reuse iTweak to add the protection and your ready to go.
    If you run into any problems, please contact me via email and do NOT use the comments form below.

Looking for iWeb Templates? Check out my huge collection right here.

If you have enjoyed this article and you wish to make a small donation, then feel free to do so by clicking here.

58 Responses to “Password-Protect iWeb Sites”


  • Hi,

    I tried emailing and searching the comments for an answer to this question first, but to no avail.

    I just wanted to know where the published site folder is that I’m suppose to choose from itweak? If I’m publishing my site via iWeb, the only real file there is for the site is the domain file which is not clickable through the “choose published folder” option.

    Can anyone help me out with this?

    Thanks,
    Steve

  • Alright, I figured out my last problem, and followed the directions to the “T”. The site is up but doesn’t prompt me for a user name/psswrd.

    I’m going to forge ahead and try to figure this out on my own but if anyone can help that’d be awesome!

    Thanks!

  • Figured it out. But now it’s only prompting me for a psswd to see the movie I have on my 2nd page, but not the entire site! All I have to do is hit cancel and enter the site. that’s weird.

  • im having a hell of a time getting this one to work.

    Would you mind having a look at my files please. I’ve been over and over but im doing something wrong. I can see the htaccess and psw files

    i’ve used filezilla

    host: redchilidesign.net
    psw: redchili
    psw:vadger

    public html/password/password

    all the files are in there. I half got it working once but when i logged in it didnt go to the site. Now the pasword isnt coming up. Any help would be appreciated

    Clint

  • Steve did you get it to work… If so what host are you using and how did you create a folder…

  • better to use video tutorial to see the real or live instruction.

  • Hi Guys,

    Hope you are well.

    I’m trying to install a password protection on my iWeb site. I have created a handful of sites on iWeb and they are all hosted with GoDaddy.

    I have found what my absolute path for the .htaccess is, but am coming to a dead end when doing step 7. in the iTweak Tutorial ie. when hitting the ‘Choose Published Site’ button. When I click this ‘Choose Published Site’ button, there is only one file sitting in the iWeb folder on my hard drive which is the domain file, which is not clickable through this ‘Choose Published Folder’ option. (having the same problem that Steve originally had)

    Are you guys able to help me out with this please?

    I only want the password protection on one of my iWeb websites and not all of them and not sure if I can do this seeing as they are all hosted with GoDaddy and have the same absolute path under this hosting account.

    Many thanks and look forward to hearing from you.

    Cheers,
    Heidi :)

  • Thanks for the post. Really enjoyed it :)

Leave a Reply