How to hide a WordPress page from Google

Introduction Have you ever wondered how to hide a WordPress page from Google? That means Google does not index it and it does not appear in the search results. If you are looking for a simple but effective solution, today’s…

How to hide a Wordpress page from Google

Introduction

Have you ever wondered how to hide a WordPress page from Google? That means Google does not index it and it does not appear in the search results. If you are looking for a simple but effective solution, today’s tutorial is for you. Don’t worry about anything because this method will not affect the search engine optimization of your overall website.

Why do we need to hide a post or page from Google?

As you know, Google is a search engine that allows you to exclude posts, pages, or content of your site from search results. However, do you know why and when we need to do that?

Actually, there are many situations in which hiding a post or page is necessary and important. For example, if you own a website containing a lot of membership information, you need to hide the profile pages of your members to ensure their confidentiality and safety.

Another case in which you should hide some pages is when the content on that page is not relevant to the general public, such as a page about website ownership.

Moreover, in case you are only developing part of the website content and want to share the preview with your audience, it is a good idea to hide the page from Google.

Methods to hide a WordPress page from search engines

In today’s blog, we would like to show you the 3 easiest ways to hide a WordPress page:

  • Using the All in One SEO (AIOSEO) plugin
  • Using robots.txt.file
  • Password-protecting a post or page

Hide a page with the All in One SEO (AIOSEO) plugin

All in One SEO is a fairly popular plugin with a large number of users. It is considered one of the easiest-to-use and most reliable WordPress SEO Plugins.

For beginners, this is a great solution because the steps are not too complicated. You just need to follow the instructions that we will show below.

First of all, you need to install and activate the plugin by going to Plugins -> Add New. Then, type the name of the plugin ‘All in one SEO’ in the search bar to find it. After that, press ‘Install Now’ and activate it once the installation is finished.

hide a wordpress page 1

A welcome screen will appear to confirm that the plugin has been installed and activated successfully. Now, click ‘Let’s Get Started’ to continue. There are some steps for filling in and checking basic information; you can skip them and go to the advanced settings.

 hide a wordpress page 2

If you want to hide a post from Google, let’s go to Posts and choose the post you need to hide. Then, press ‘edit’ and scroll down to the AIOSEO Settings. In the Advanced part, the first line is Robots Setting, and ‘Use Default Settings’ is turned on. Let’s click on the toggle to switch off the setting.

 hide a wordpress page 3

After turning off the Robots setting, the Robots meta with many options will appear for you to select. It’s time for you to hide the post from search engines by clicking the box ‘No index’. Then, you can publish or save your post.

hide a wordpress page 4

If you want to hide other sections of content, go to All in One SEO -> Search Appearance on the admin dashboard. There are many different tabs and sections where you can change how content shows in search results.

For instance, in the image below, we choose the tab Taxonomies and turn off indexing for categories and tags. Don’t forget to save changes after altering anything.

hide a wordpress page 5

In case you are looking for a way to hide media files from search engines, you need to upgrade AIOSEO to the Pro version.

To sum up, there are many options for setting the no-index status of your posts or pages. This plugin supports you in both the free and Pro versions. Let’s check it out.

Hide a page using robots.txt File

What is a robots.txt file? In simple terms, it’s a configuration file that you can add to the root of your WordPress site. It allows your website to give instructions to search engine bots.

By using an FTP client or a file manager, you are able to modify the robots.txt file smoothly.

Firstly, you need to add these lines to your robots.txt file:

User-agent: *

Disallow: /your-page/

The first line ‘User-agent’ will let you target specific bots. The asterisk will be used to make sure that all search engines are included.

The next line ‘Disallow: /your-page/ defines the URL path that comes after your domain name.

Let us give you an example. Say your post has this URL:

http://abc.com/2021/article-post/

So, you will add this to your robots.txt file:

User-agent: *

Disallow: /2021/article-post/

The next step, of course, is to save the changes you’ve made.

This method looks simple, but there are some disadvantages that you need to pay attention to:

  • Your robots.txt file needs to be publicly accessible
  • Although many search engines follow this file’s instructions, many other bots may simply ignore it.

Password protect a WordPress post or page

One more method to hide a WordPress page or post from Google is using password protection. Instead of using methods to prevent search engines from indexing the page, you can set up password protection so that only people with the password can access the content.

To do this, you need to go to Posts and select the post you want to protect with a password. After that, in the Publish section, click ‘Edit’ next to Visibility.

hide a wordpress page 6

Now, you are able to change the status of the post. Let’s choose ‘Password protected’ and type the password you want in the blank field. Then, don’t forget to press the ‘OK’ button to save your settings. Finally, you need to update or publish the post.

hide a wordpress page 7

Let us explain the 3 visibility options.

  • Public: If you choose this option, your post will appear publicly, which means anyone can see the post.
  • Password protected: Only visitors with the password can see the post.
  • Private: Only logged-in users with at least an Editor role on your website can see the post.

Wrap-up

All in all, there are many ways for you to hide a WordPress page from Google or other search engines. However, the 3 methods we introduced in today’s blog are the simplest, easiest, and most effective. If you are a beginner, you should follow methods 1 and 3 (using a plugin or password protection) because they are not complicated. If you want to use method 2 (using Robots.txt file), you have to be more careful.

We hope that this blog helps you in hiding a post or page in WordPress. If you have any questions, don’t hesitate to leave your comment below. Thanks for reading and see you in the next blogs.

Build it with a template

Start from a finished design: Joomla templates, WordPress themes or the AI-ready block themes. Every template has a free version and a live demo.

Stuck on a template?

Pro customers can open a ticket; everyone can read the documentation.

Free download

We'll send the link, setup tips and update notices, and you can reach us anytime through our AI assistant and contact form.

The download starts at once. We email you the link and ask you to confirm your address. Privacy policy.