Create Password protected HTML page in Website

1492521639 Maxresdefault

This Video will explain how to Create password protected HTML page in Website. # Passwords can be viewed in page source, so encrypt the code as many …


We’re happy to share this resource that we found. The content displayed on this page is property of it’s original author and/or their organization.

  1. Dilkhush MeenaDilkhush Meena04-18-2017

    thank you so much dude 🙂 🙂

  2. Art ThomsonArt Thomson04-18-2017

    Rajan Hello…I've incorporated your scrip into a page and I have two questions  1) after entering the password in chrome there is an option to Prevent this page from creating additional dialog.  Can this option be removed so the password always has to be entered.  2) I'm also looking at encrypting the pages how easy is that, I'm a novice html writer.  Thank you. 

  3. jayam tailoringjayam tailoring04-18-2017

    hello friend,

                        i am from tamilnadu. i need one big help. i need your contact details pls. my contact number 9597587794. how do i create password protect dvd?then its work dvd player also? pls help me. am waiting your contact details

  4. Debdeep GhoshDebdeep Ghosh04-18-2017

    +Shanmuka Rajan : How do u Synchronize this html code to a particular website

    For eg:If this code is made to make youtube password protected.What shall I do after saving the code
    Thanks for the cooperation 😀

  5. tom56izetom56ize04-18-2017

    I'm sorry but people can  just view the source of the page and see the code with the password in it

  6. Aidan PorterAidan Porter04-18-2017

    thank you Shanmuka!

  7. Can U have Multi Passwords?

  8. Faisal KhalidFaisal Khalid04-18-2017

    Thank you, but using this password ppl should know its easily cracked up by viewing the source of the page

  9. Pooja RoyPooja Roy04-18-2017

    thank you.. grt help 🙂

  10. Zul KZul K04-18-2017

    i want to set password on youtube and google websites.iam using wifi so i want set password on ip address for these websites.plz reply

  11. weedboyxweedboyx04-18-2017

    link is dead..

  12. clement bijlclement bijl04-18-2017

    Dislike because of your slow typing skills! I recommend a mic.

  13. Kyle PhelpsKyle Phelps04-18-2017

    This is incomplete… you'll need to add the following directly after the

    "if (password==pass1)"

    Add that directly before the else statement/after the if statement.
    That'll let you redirect them if they're wrong, and direct them where you intend to go if you have the correct password.

  14. Brendan MaceBrendan Mace04-18-2017

    I've seen a few people trying this!

  15. TymeTyme04-18-2017

    thx chu

  16. Chan IrisChan Iris04-18-2017


  17. krisklevkrisklev04-18-2017
  18. Chris MartinChris Martin04-18-2017

    Hi Shanmuka, I know your script has been here for some time but I have just found it. I wonder if you could help a little further, 2 questions: 1. can you lose the white background of the sign-in page and pretty it up a bit. 2. can you enclose this script in a php code block on the page you want to protect, rename the page whatever.php so that the source code is hidden. Thanks

  19. Ross FrankelRoss Frankel04-18-2017

    If you have sometime, you can check out my video tutorial about "Create a gorgeous website"

  20. Flight23Flight2304-18-2017

    how do you remove it

  21. Alaska ManiAlaska Mani04-18-2017

    Nope, it won't work. One could disable scripting on their browser settings, allowing them to get past the "prompt" action.

  22. wolf5659wolf565904-18-2017

    Checked every single letter and character, didn't work for me.

  23. 3Body ;D3Body ;D04-18-2017

    But When i press cancle or write the wrong password also it takes me to the webpage

  24. a persona person04-18-2017

    This will work, but it's just so easy to get around. All you have to do is inspect element…

  25. if you downloaded the code from make this edition:

    var password;
    var pass1="5555";

    password=prompt('Please enter your password to view this page!',' ');

    if (password==pass1){
    alert('Password Correct! Click OK to enter!');

  26. Work. Thanks alot


    thanks . works good

  28. Ken LuKen Lu04-18-2017

    How do I prevent login again when refresh the page if I put this script under the main index page?

  29. msqarmsqar04-18-2017

    this is the most ridiculous way to "protect" your web page… just by looking into the source HTML code you can see the password hardcoded.. :S not safe at all.

  30. Haiyan ChenHaiyan Chen04-18-2017

    hmm the text file I downloaded in ur google drive is empty

  31. elationelation04-18-2017

    hi is there a way to have more than one password and username. like code to add a different username and password

  32. elationelation04-18-2017

    where could i insert my own text in. Like if i wanted to put a sign up button under the login button

  33. Muthu KumarMuthu Kumar04-18-2017

    Thanks Very Useful ! How to mask my password ?

  34. JANJAN04-18-2017

    can I use window.location="": ????

  35. Thinzy BoarThinzy Boar04-18-2017

    on google chrome, when i hit cancel it opens up the page anyway. Is there a way of fixing this?

  36. MCr33pyMCr33py04-18-2017

    Anyone can read your js code and get your password.

  37. Ali HasanAli Hasan04-18-2017

    How can I make several usernames and password for each user

Leave a Reply

You must be logged in to post a comment.