How to password protect a page in Blogger

Catherine wrote

Is there a way to set up stand alone pages for an ecourse that someone could page through on Blogger (from a button on your blog) that would require a password to get into? Password so that when they buy, you could send them the password; but then they could access it from your blog.

Yes there is! Blogger does not have password protected pages integrated into its system, but you can use a bit of javascript to do the trick. Essentially, you add a line of code to your template, then encrypt your text, set a password and add it to your page.

If you are planning to use this for lots and lots of pages you might consider making a second blog and password protecting the entire thing, but for a few posts or pages this is a pretty good trick!


1. Go into your template (save a copy of your template first just in case!) and search for </b:skin> Paste this directly after

<!–MBT PASSWORD PROTECT CODE –><script type=”text/javascript” src=””></script>

2. Create a page in Blogger and add all of your content.

3. Click the HTML button and copy everything you would like encrypted. You can add non-protected text above and below the encrypted portion if you like.


4. Go to

5. In the key box type your desired password

6. In the plain text box paste the text you copied and click encrypt

7. Copy the code from the HTML box and paste it back into your page. You can change ‘Show encrypted text’ to say whatever you like.

8. Save and test it out!

9. For advanced users: You can change it from saying ‘Enter the decryption key’ by adding another parameter decryptText(‘uniqueID’, ‘Enter the password:’)

Note: comments are not able to be protected, so you may want to turn those off if you don’t want anyone spilling the beans.

You get lots of points for trying this one out! And, as always, if you have a nerdy question about blogging, Photoshop, WordPress or Blogger leave it in the comments and I’ll answer it in an upcoming Nerd Party post.


    Leave a Reply

    Your email address will not be published. Required fields are marked *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  1. says

    Thank you so much for this tutorial! I’m running into an issue though. Whenever I try to copy and paste the first code on my template, I get this error message: Error parsing XML, line 624, column 3: The content of elements must consist of well-formed character data or markup.

    So I haven’t even been able to get past step one! Any idea what the problem might be?

    • Yunairia says

      Just redo the quotation marks in the line and it’ll fix itself. Google is being weird in that they’re reading the quotes as strings instead of parameter start.

      Thank you for this! I found this page while trying to figure out how to password protect a page on my blog!

  2. bree says

    Hi, I found this post because I’m searching for a way to set my entire blog to “password protected”, it’s thru blogger and I can’t find any option to set a password for the entire blog, just the option to control which users can view it (and I’m not even sure how that works either). Can you help me please?

  3. says

    got this error meg:

    Error parsing XML, line 14, column 15: The content of elements must consist of well-formed character data or markup.

  4. RScott says

    This is the best explanation for the password protect I have come across! I have a query though… mine works when I view the blog as a whole but if I am in the individual blog page then the link is dead (i.e. I click on it and no pop up shows). I’d be grateful if you had any ideas how to fix? Thanks!

  5. Seamus says

    Love the straightforward explanation on setting this up thanks. I get the parsing message as well. Any further ideas on making this work or a workaround please.

    “Error parsing XML, line 572, column 3: The content of elements must consist of well-formed character data or markup.”

  6. Katie says

    Are you savvy, by any chance, on how to host a workshop through blogger? I would like to set up a private page that would be available to my students. So, I am guessing the above information is what I need to integrate?


  7. says

    For anyone that’s having trouble with parsing errors. Just add the Java script call out within your head tags at the top of your blog template in lieu of below the skin as denoted in the tutorial. Everything else works perfectly.

    Thanks for the great tutorial!

  8. Sarah S. says

    I am trying it out, and when I did the cut and paste for step one, it gave me errors as well. I tracked it down – it is just a formatting issue.

    Instead of <!- it has to have two dashes after the exclamation point

    Also, it has to be single quotes instead of double quotes used in the rest of the code.

    I hope this helps – now on to step 2!

  9. Jen says

    I password protected my blog and it works perfectly. However even you can still view the page via smart phone. Is there any way to stop this?