Blogs By Heather, Blog Setup, Blog Design, Heather Wright-Porto

About Me

Mini Bio
Heather Wright-Porto
Sloatsburg, NY
Blog Setup and Design
Email Me

Follow Me

Pin It

« What's Missing in Aweber's New Broadcast Editor? | Main | Try Photoshop CS6 for FREE! »

March 28, 2012


Feed You can follow this conversation by subscribing to the comment feed for this post.

Mike McNally

This is a fine technique if you don't really care about the fact that it's absolutely trivial for anybody to discover what the "secret" password for the site is. Don't use this method to protect any actual sensitive information - in other words, if you use this, don't put anything on your site that you're not comfortable with being visible to the entire Internet.


I enter the html code as directed but I can't get the password protected box to pop up?

Any help would be appreciated.


Sorry again. It doesn't open a new tab. And I added the note to the dialog box. It's perfect. Thanks again.


I'm sorry-it did work very well. Thank you. I think I was testing a cached version of the site.

On failure, I'd like to go to a page that gives instruction for getting a password. Any simple way to do that? Now I have it pointed back at my blog, but it opens in a new window. Kinda messy. Thanks so much.

Heather Wright-Porto

Hi Christine!
It won't show because of the use of the
hides the script, but allows the script to function.
Great questions :D


Hi Heather, will people be able to see the password if they 'view source' on my blog?

Electronic Bidet

Works good....but when you click cancel... it shows you the page anyways. Amazing. really i was looking for. nice blog.


how to use this feature in google sites


I like the the password protection but I was only trying to password protect the one blog post..... It seems as long as that blog post is on my home page that it continues to prompt for the password over and over again!!! Is there a way to simply show the blog post itself requires a password for it to load? Like just the post itself, not over the whole page? It's a little annoying over the whole page for each load. Thanks!


Hello is there a way to only have the password come up once for the blog, instead of for every different page?

Heather Wright-Porto

Hi again :D
Yes you can protect a certain page(s) using this method:

Create your page as you normally would.
Finishing composing the page until the only thing left is to "protect" it.
Switch to Edit HTML view.
Copy and paste in the code below to the top of your page.
Edit the password (in my example it is TypePad) and the site to be directed to if hte password is incorrect (in my example it is my site).
Then you can Publish the page.


Thx Heather, I can email you a link to the blog if you want to take a look. It's for my class, I want to keep the videos and some other stuff private. It would be great if I could just have a password protection for certain pages! You're very generous with your time to help us bloggers!

Heather Wright-Porto

Hi Sylvia.
Hmmmm….yes, I can see that being a problem. It's probably best designed for if you want a page protected versus an entire blog. I'll see if I can find a revised JavaScript procedure that recognizes the number of times etc…. but yes, I can see that being an issue if you go to another page on the site….


Hi again Heather,

It appears that when I password-protect my blog, a visitor needs to re-enter the password for every page on the blog. Is there a way to work around this? Ie. I would prefer that the visitor only has to use the password once.

Thanks so much!



Dear Heather,

This is awesome, thanks so much! It took me a while to figure it out since I didn't realize that 'Typepad' occurred in the script twice!

Heather Wright-Porto

Yes, if you have a read-only blog where only certain people are invited to view it, then you don't need to password protect it :D

Heather Wright-Porto

Hi Inge,
Maybe there is something incorrect in the code being copied or the password, or just Blogger being quirky. For starters, lets try and remove the code and stablize the blog again. Then we can try putting in the password code again.
keep me posted.

Inge Riise Iversen

Dear Heather!
I have some major problems: On my mac on firefox I have to enter the password many times and therefore I cannot edit any thing.
On my pc the whole blog just goes bananas flashing.......
Greetings from Norway
Mr. Riise Iversen


Hi Heather!

I chose the option to have only select readers able to access the site. Do i need to cancel this option in order for the password to work?

As of now, the invitation states that readers are required to have a gmail account and those without it don't even get to the option of entering a password/viewing my blog.

Heather Wright-Porto

Yes, you would substitute "TypePad" with whatever you would like the password to be.


amazing!!! thank you a ton


@suzane and meaghan, you can change

var password = 'TypePad'


var password = "TypePad"

same goes to

instead of
if (password != 'TypePad')


if (password != "TypePad")

double quote...


Works good....but when you click cancel... it shows you the page anyways.

Peter T

This was helpful, but this caused my browser to occasionally ask for a password on seemingly random sites. I don't want this to happen to a client, help!


Thanks a lot! :D I have been looking for this.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment

Your Information

(Name is required. Email address will not be displayed with the comment.)

All content © Heather Wright-Porto (Premier Computer Solutions LLC). You cannot publish, copy, edit, sell, trade or distribute without prior authorization.