How to Create a Password Protected Page in Blogger?

Password Protected page is only possible in WordPress Blog but what about Blogger? 

Can we protect certain page by adding password or not?

When I first began my tutorial blog in 2012 blogger was the most popular platform for me. However, because of its simplicity and less customization functionality, many people switch to WordPress after a few years. About the fact that Blogger is still constrained in many ways, most problems can be solved with a little study on the web. I'm comfortable with the Blogger platform and don't want to switch anytime soon!

I was trying to protect my several pages from restricting the visitors to visit but in Blogger platform hasn’t such things to protect it. Because Blogger doesn’t have Plugins for protecting any specific page. Either you have to add a password to the whole Blog or you have to make the Blog private. So our main objective won’t serve.

How to Create a Password Protected Page on Blogger

In WordPress Blog, we have seen Blog owner used password a protected page for delivering exclusive content to their VIP subscriber. Suppose you have written an eBook and now you want to deliver this eBook to your blog's subscriber-only. 

In this case, you won’t able to restrict access of all visitors on Blogger. In this case, the Password Protected page work like charm. Because without a password your Blog’s subscriber won’t able to get access to the content’s page.

So Password Protected option is necessary. You can increase your Blog subscriber as well as your exclusive content will be protected from public access.

How to Secure a page on your Blog with a Password?

The password is required to unlock the shared blog material, even though the page is marked as "published." Afterwards, the password can be shared with your newsletter subscribers. They can log in to view new material on a daily basis.

Simply follow the instructions below to build a password-protected page and invite your customers to join your library!


Step #1: Log in to your Blogger Account and Go to your Blogger Dashboard

Step #2: Click on -> Pages -> New Page-> Blank Page

Step #3: Now choose HTML view instead of Compose view and copy the below script and paste it on the page.
 
<script type="text/javascript"> 
/* Password Protection Script by www.bloggerspice.com*/
var password = 'BloggerSpice'
password=prompt('Please enter the password to enter this page:','');
if (password != 'BloggerSpice') {
location.href='PAGE URL HERE';
}
</script>

Customization

  • Alter BloggerSpice with page password.
  • Replace PAGE URL HERE with your page URL where you want to set a password.

Step #4: Finally hit the publish button.

For testing the password-protected page visit that page and see it is the required password to get access.


protect page by password

In this trick, I have used simple JavaScript and just you have to set a password and you can change the password according to your own. And remember about changing page URL. You should change the URL for applying the password. 

In just 4 easy steps, you'll have a password-protected webpage! Now is the time to start creating a VIP Library of amazing content that your readers and potential subscribers would be compelled to subscribe to!

Happy blogging! Thank you.

40 Comments

  1. Trinisaurus
    hey thanks for sharing the tricks! it comes in handy. useful stuff!
    • BloggerSpice
      Welcome Trini Ng.. Love to hear feedback from you. ;)
  2. Muhammad Tahir Habib
    bro it works on all pages as well as home page... I just need a post protector not a blog??? please help

    Tahir Habib | Tipricks
    • BloggerSpice
      Hi Tahir, I think you have forgot to add your Post URL. Please replace PAGE URL HERE with your Blog Post URL. And now it will work on your specific post page.

      location.href='PAGE URL HERE';

      Thank you

      :-bd
  3. Unknown
    This was SO helpful and above else EASY to understand. Thank you so much!!
    • Steven Storniolo
      Helpful until you get hacked.
    • Yea its easy and also amazing it works like fire
  4. it affects all entire page even if you specify the url
    • BloggerSpice
      HI Walmart, I don't think so, because I have tested this it is working fine.
      ^_^
  5. Pesantren Tahfizh At-Taqwa
    OK, how to password protect this >> PAGE URL HERE <<

    I could set a passoword for a page, but people can still freely access the url in this location.href='PAGE URL HERE'; directly

    Thank you
    • BloggerSpice
      This trick is working for me. You have to replace 'PAGE URL HERE' with a blogger static page. Try it in another blog site and let me know. Thank you. :)
  6. Andrew!
    This is great, but it only works from desktops and laptops. It doesn't work for mobile devices and tablets. Any idea why?
    • BloggerSpice
      Hi Andrew :(
      Probably in Mobile device URL changes. you will see at the end of the URL it shows m? for this reason it doesn't work in mobile device.
  7. Unknown
    bro
    you try

    it helps
    thanks
    • BloggerSpice
      Hi Sir Farday :)
      I'm very glade to see you here. Thanks for dropping your comment.
  8. William Davis
    Good job!! Thanks for sharing.I was looking alternatives for password protectionof my blog, your blog helped me.
    • BloggerSpice
      Thanks william for your feedback. :up
  9. Is it possible to make multiple passwords ?
    • BloggerSpice
      Hi Ali :)
      Yes this is possible to create multiple password in a Blog, but you have to use separate page. For each page you can create different password. Thank you.
  10. Unknown
    I think this password protector work only for pages not posts. I want to protect blog posts only. Can you help me?
    • BloggerSpice
      Hi Farhat this widget will work only on Pages not in post. :(
  11. Steven Storniolo
    Ok listen. This is NOT how you create a login. This is one of the most insecure things you can do. First you should have a database to connect to and store passwords in. Passwords should at the very least be encrypted and you compare the encrypted versions, not the plain text. Now last if you're sticking that into the HTML you will be hacked in seconds.
    • BloggerSpice
      I am agree with you. But this is a simple trick for Blogger platform user to create password on a specific page. :t
  12. please how can I protect only a single post
    because when I did it the whole page became loked up
    • BloggerSpice
      Hi There :as
      This tutorial is for adding password on single page. Just add the code on specific page that you want to protect by password.
  13. THANKS A LOT! It's funny how people take time to criticize/ complain about this or that not working (if the only read the whole post like...this is for a static page) but few to thank. So I am doing my part: THANK YOU.
    • BloggerSpice
      Welcome Bro :up
  14. Unknown
    thanks :) good tip
    • BloggerSpice
      Welcome :dn
  15. クルーズブラザーズ
    I like this simple trick! thank you! but you can still see the password If you open the source code right? Is there any way to hide them??
    • BloggerSpice
      Hi Chiaki Davis :(
      in Blogger platform we can view the source code easily. So it is not possible to hide the password. Alternatively you can disable the right click and "ctrl + U" function
  16. Yamin Hossain Shohan
    this is crazy.. if someone view source code, they can find easily your password. you should encoded your source code..
    • BloggerSpice
      Hi Yamin Hossain
      Thanks for the great idea. However encoded script can decode easily. But encoded script will increase the password security. :up
  17. RBroyles
    Hello! I did this and it worked, thank you! But now I would like to remove it. I deleted the new page. But my blog is still requiring a password and when I type it in it's telling me that the page I'm looking for doesn't exist. What step am I missing? Thanks in advance!
    • BloggerSpice
      Hi There ^_^
      After removing the page password shouldn't appear. Because the password work only on that specific page. I think you did any other mistake.
  18. Unknown
    This method can easily passed by deactivated the javascript in the browser.
    • BloggerSpice
      Hi Yode Arliando
      Can you enter into page after deactivating the JavaScript or this is just disabling the JavaScript?
  19. Tina da Bulle
    It helped me a lot. Thanks!
  20. Angelia
    Thank you! Just want I needed!
  1. To insert a code use <i rel="pre">code_here</i>
  2. To insert a quote use <b rel="quote">your_qoute</b>
  3. To insert a picture use <i rel="image">url_image_here</i>
Go Up