How Can I Password Protect a Web Site?

F

Freelancer

I'm a freelance writer new to building Web sites. I'm using Publisher 2003
to develop a site for a client. How can I password protect the site so my
client can see the live site, but the public won't be able to view it until
we're ready for public viewing?
 
B

Bigfix

Don't know how to password the site but this is what I have done in the same
situation.
Load the preview site to a different location and supply that URL to the
client.
i.e. live site URL is www.product.com,
load preview to www.product.com/trial/preview/

If this is only for a few weeks or so then there is little chance a search
engine will find it or the public will find it. Good Luck!
 
D

David Bartosik

bigfix is 100% correct. first unless you are heavily promoting the url to an
interested audience nobody will know about the url. all the hits will be from
you and the client. I load developing sites ' as is' all the time. otherwise
you don't have to make it complicated as he stated just load the site under a
sub-folder. But to actually answer your question, speak to your web host
about their options for securing site access. On another note, Publisher is
not intended for professional site development, you are likely doing a
dis-service for your client.
 
F

Freelancer

My Web hosting company told me this and a couple of other things would work,
but I couldn't get any of it to work so I just published the site like I
would publish any other site. My client is fine with it. Thanks for your
suggestion. I'll remember it if I work on another site like this.
 
F

Freelancer

I ended up loading the site "as is" because I couldn't get anything else to
work. I know Publisher isn't the greatest for building Web sites, but that's
what came with my computer. I'm not planning on developing a lot of Web
sites ... writing is my specialty. My client came to me asking me to build
the Web site. I told my client it will be really basic and my client was
fine with that. Thanks for your comments.

David Bartosik said:
bigfix is 100% correct. first unless you are heavily promoting the url to an
interested audience nobody will know about the url. all the hits will be from
you and the client. I load developing sites ' as is' all the time. otherwise
you don't have to make it complicated as he stated just load the site under a
sub-folder. But to actually answer your question, speak to your web host
about their options for securing site access. On another note, Publisher is
not intended for professional site development, you are likely doing a
dis-service for your client.
--
David Bartosik - [MSFT MVP]
http://www.publishermvps.com
http://www.davidbartosik.com



Freelancer said:
I'm a freelance writer new to building Web sites. I'm using Publisher 2003
to develop a site for a client. How can I password protect the site so my
client can see the live site, but the public won't be able to view it until
we're ready for public viewing?
 
D

Don Schmidt

Below the ========== is how my ISP offers to protect a website. I have a
password protected folder on one of my sites and this works very well.

--
Don
Vancouver, USA


===============

How can I password protect my web site?

There are many methods of protecting your web site using a password. We
recommend using .htaccess and .htpasswd files as this is a very secure, yet
very easy-to-configure option.

NOTE: It is not possible to use .htaccess/.htpasswd files to protect your
/cgi-bin directory.

Step 1: Create the .htaccess file:
Using a text editor such as Notepad create a file called .htaccess. (The
file extension is .htaccess. It is not file.htaccess or somepage.htaccess,
it is simply named .htaccess.) There is a chance that your text editor will
add its default file extension to the name (ex: Notepad might call the file
..htaccess.txt). You need to remove the .txt (or other) file extension in
order for it to function. It should look something like this. ( Note:
yourdomain does not include www. )


--------------------------------------------------------------------------------
AuthUserFile /home/iinet.com/y/yo/yourdomain.com/cgi-bin/.htpasswd
AuthName "This is my protected page"
AuthType Basic

<Limit GET>
require user joeuser
require user johndoe
</Limit>

--------------------------------------------------------------------------------
AuthUserFile is the full server path to your .htpasswd file.The "y" in this
example would be the first letter of your domain name. "yo" would be the
first 2 letters of your domain name. "yourdomain" should be YOUR domain.

AuthName is the name of the area you want to access. It could be anything,
not necessarily "This is my protected page" as in the example.

AuthType Basic for basic HTTP authentication.

require user <username> is where you enter the username of those who you
want to have access to that part of your site. Note that using this will
allow only that specific user(s) to be able to access that directory. If you
wanted the entire list of users in the .htpasswd file to have access to a
directory, you would replace require user <username> with require
valid-user.

Step 2: Create the .htpasswd file:
Using a text editor such as Notepad create a file called .htpasswd. Next you
will need to add the "encrypted tokens" of the users that will have access.
Click the link below to generate passwords.
Password Generator

Just cut and paste the results from this form to your .htpasswd file. The
..htpasswd file should look something like this.
( username:encrypted password )
--------------------------------------------------------------------------------
joeuser:39HWifjGAj/7.
johndoe:G4wt/<35SjGas
--------------------------------------------------------------------------------

Step 3: FTP the files to your website:
Upload the .htpasswd file in a secure directory (cgi-bin is a likely
candidate) using your FTP program. If you upload the file to a different
directory, make sure it matches the path you reference in the .htaccess
file.
Upload the .htaccess file in the directory you want to protect. Putting the
..htaccess in your default directory will cause your whole web site to be
password protected. This will prevent anyone without the correct username
and password from viewing your web site. Do not do this unless that is what
you want to do.

a.. Printer friendly page
b.. Need further assistance? Live Chat now
c.. Did you find this helpful? Fill out our survey
d.. Search Amazon.com for books related to this topic
 
F

Freelancer

Thanks. We're getting by without password protecting the site, but I'll keep
this in mind if someone asks me to password protect a site again.
 
M

MidsummerMeadow

I put the .htaccess file in the directory I wanted to protect, and when I try
to open a page in that directory there is no prompt to enter
username/password. It just opens the page for the public to view.

Does anyone know any solutions?
Thanks
 
D

Don Schmidt

Do you have a cgi-bin directory? If not, you need to create one and then do
Step 3 in your post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top