How To Password Protect Blogger Or Wordpress Blogs
Hello friends, do you know, you can password protect your blogger or wordpress blogs easily, free of cost. Here I am going to tell you the process to password protect your blog, to be safe from spammers and frauds.
1. Go to Blogger Dashboard> Template > Edit HTML
2. Now press Ctrl + F and search for the
</body>
tag and add below code above it.<script>
var password = 'Password-Here'
password=prompt('Please enter the password to enter this site:','');
if (password != 'Password-Here') {
location.href='Redirect-URL-Here'}
</script>
3. Now just press Save Template and refresh your blog to see the password asking popup.
Customizations :
You can change the password according to your wish, just change the letters in red color to your password. You can add any URL to which the visitor will be redirected if he enters the wrong password or cancel to add any password, just change the Blue Color line in the above code with your URL.
0 comments:
Post a Comment