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? This tutorial will help you to create a password protected page on a blogger blog. Learn how to make your Blogger Static Page protected by the password defined by yourselves. And How to Set Up a Password Protected Page?

Password Protected page is only possible in WordPress Blog but what about Blogger? Can we protect certain page by adding password or not?

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

In WordPress Blog we have seen Blog owner used Password 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 blogs subscriber only. 

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

How to Set Up a Password Protected 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. To add password on specific Blogger page please follow the below steps-

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*/
var password = 'BloggerSpice'
password=prompt('Please enter the password to enter this page:','');
if (password != 'BloggerSpice') {
location.href='PAGE URL HERE';


  • Alter BloggerSpice with page password.
  • Replace PAGE URL HERE with your page URL where you want to set password.
Step #4: Finally hit the publish button.

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

protect page by password

In this trick I have used simple JavaScript and just you have to set password and you can change password according to your own. And remember about to change page URL. You should change URL for applying the password. Thank you.
Trinisaurus says: 2/10/2016

hey thanks for sharing the tricks! it comes in handy. useful stuff!

BloggerSpice says: ADMIN 2/10/2016

Welcome Trini Ng.. Love to hear feedback from you. ;)

Muhammad Tahir Habib says: 2/11/2016

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 says: ADMIN 2/11/2016

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


Unknown says: 9/19/2016

This was SO helpful and above else EASY to understand. Thank you so much!!

Anonymous 11/19/2016

it affects all entire page even if you specify the url

BloggerSpice says: ADMIN 11/20/2016

HI Walmart, I don't think so, because I have tested this it is working fine.

Pesantren Tahfizh At-Taqwa says: 2/16/2017

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 says: ADMIN 2/21/2017

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. :)

Andrew! says: 3/30/2017

This is great, but it only works from desktops and laptops. It doesn't work for mobile devices and tablets. Any idea why?

BloggerSpice says: ADMIN 3/31/2017

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.

Unknown says: 4/27/2017

you try

it helps

BloggerSpice says: ADMIN 4/27/2017

Hi Sir Farday :)
I'm very glade to see you here. Thanks for dropping your comment.

William Davis says: 5/16/2017

Good job!! Thanks for sharing.I was looking alternatives for password protectionof my blog, your blog helped me.

BloggerSpice says: ADMIN 5/18/2017

Thanks william for your feedback. :up

Is it possible to make multiple passwords ?

BloggerSpice says: ADMIN 8/16/2017

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.

Unknown says: 8/21/2017

I think this password protector work only for pages not posts. I want to protect blog posts only. Can you help me?

BloggerSpice says: ADMIN 8/27/2017

Hi Farhat this widget will work only on Pages not in post. :(

Steven Storniolo says: 11/02/2017

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.

Steven Storniolo says: 11/02/2017

Helpful until you get hacked.

BloggerSpice says: ADMIN 11/05/2017

I am agree with you. But this is a simple trick for Blogger platform user to create password on a specific page. :t

Anonymous 11/25/2017

please how can I protect only a single post
because when I did it the whole page became loked up

BloggerSpice says: ADMIN 11/26/2017

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.

Anonymous 12/06/2017

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 says: ADMIN 12/07/2017

Welcome Bro :up

Unknown says: 1/13/2018

thanks :) good tip

BloggerSpice says: ADMIN 1/28/2018

Welcome :dn

クルーズブラザーズ says: 2/06/2018

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 says: ADMIN 3/26/2018

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

Yamin Hossain Shohan says: 3/30/2018

this is crazy.. if someone view source code, they can find easily your password. you should encoded your source code..

BloggerSpice says: ADMIN 3/31/2018

Hi Yamin Hossain
Thanks for the great idea. However encoded script can decode easily. But encoded script will increase the password security. :up

Pablo Escober says: 4/04/2018

Yea its easy and also amazing it works like fire

BloggerSpice says: ADMIN 4/05/2018

Thanks Pablo Escober for your feedback. :up

RBroyles says: 6/21/2018

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 says: ADMIN 7/01/2018

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.

Unknown says: 7/09/2018

This method can easily passed by deactivated the javascript in the browser.

BloggerSpice says: ADMIN 7/09/2018

Hi Yode Arliando
Can you enter into page after deactivating the JavaScript or this is just disabling the JavaScript?

Tina da Bulle says: 1/18/2019

It helped me a lot. Thanks!

Angelia says: 1/22/2019

Thank you! Just want I needed!

Contact Form


Email *

Message *