How to Password Protect Your Entire WordPress Website?

How to Password Protect Your Entire WordPress Website?

During the development stage of this site, we used this process to password-protect our entire WordPress site. Today, we arae going to show you this easy method to use a password to protect your WordPress from search engines as well as from users.

Why You Should Use Password Protection on WordPress?

When a website is in the development stage, you don’t want users to take a look at your unfinished and ugly site.¬† Hence, a lot of people use passwords to protect their front-end from users and search engines.

Don’t worry, if your SEO team or an employee needs access to your site, you can share a password with them.

We used password protection only to stop our site from getting indexed by search engines before it was ready.

1. Password Protect Your WordPress Site Using a Plugin

“Password Protected” is a free WordPress plugin which we are going to use in this tutorial. If you are using any caching plugin or server-side caching then make sure to turn it off.

Note: This plugin only protects your WordPress generated content. Images and uploaded files will still be accessible if anyone enters the exact URL.

 

Step 1: Download Password Protected plugin from the WordPress plugins directory.

Install Password Protected plugin from WordPress plugins directory

Step 2: Activate the plugin on your site if you haven’t already.

Select Password Protected from settings

Step 3: Move over your mouse to WordPress settings and select ‘Password Protection’.

Step 4: In the ‘New Password’ field, set a password for the website. Repeat it in the second field.

Enable Password Protected

Step 5: Check the box “Password Protected Status” to enabled.

Step 6: Click on the button Save Changes.

These settings will make your WordPress site password protected. If someone tries to access your site with a URL they have to enter the password before they can access the site content.

2. Use htaccess for Password Protection on WordPress

Most quality hosting services offer an htaccess password protection. You can usually find htaccess password protection settings in cPanel. We are sharing methods for 2 hosting services; Godaddy and SiteGround.

Htaccess Password Protection Godaddy
  1. Login to your Godaddy hosting account. Go to cPanel, in the Files area, click Directory Privacy.
  2. Select a directory to open (not the directory you want to use), and then click Go.
  3. Click the directory you want to use.
  4. Select Password protect this directory option.
  5. Enter a Name of the protected directory, and then click Save.
Htaccess Password Protection SiteGound
  1. Login to your SiteGround hosting and go to cPanel main page.
  2. It will display all of the directories on your account.
  3. Find and select the directory you want to password protect.
  4. It will bring a new page, where you need to set a username and a password. Click on the button ‘Add or Modify the Authorized User’.
  5. On the next step, enable the Password protect this directory option. Add a text that you would like your users to see when they see this page

3. Protect Your WordPress from getting Indexed by Search Engines

Using this process you can disallow search engines to visit your site. If you apply these settings, it will add a new robots.txt directive which will tell search engines to don’t index this website.

This process only limits search engines to index your site only when they find your robots.txt. For example, if they find your site from a link on the Internet, they might index it. So, you should only use this method along with password protection.

  1. Login to your WordPress site. Hover your mouse to the settings button and select ‘Reading’.
  2. Enable ‘Search Engine visibility’ option to ‘Discourage search engines from indexing this site’.
  3. Click on the Save Changes button.

We hope you find this tutorial useful. If you want to learn more cool stuff about WordPress then please consider subscribing to our newsletter.

Leave a Comment

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

Get Exclusive Content

Join thousands of subscribers who get free newsletter with powerful tips to drive more traffic and revenue.

You have Successfully Subscribed!