Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Hide a WordPress Page From Google

Are you looking for a way to hide a WordPress page from Google?

Sometimes you may need to exclude a page from appearing in Google search results as it is not relevant to your site’s content, to protect your privacy, or to keep away unwanted users.

In this article, we will show you how to hide a WordPress page from Google without affecting your site’s overall search engine optimization (SEO).

How to Hide a WordPress Page From Google

Why Hide a WordPress Post or Page from Google

Search engines like Google allow website owners to exclude content from search results.

For example, you might want to hide WordPress blog posts and pages that don’t have any relevance to the general public, such as a page you might have to create for website ownership verification.

You may also wish to exclude pages that have private or sensitive information to protect your privacy and prevent confidential information from falling into the wrong hands. For example, if you have a membership website, you can hide the profile pages of your members from appearing on search engines.

Hiding content from Google is also helpful if your website is under development and you want to share a sneak preview with your audience. That way Google won’t index an unfinished website in its search results.

In this article, we will cover different ways to hide WordPress pages from Google including using an HTML meta tag, using your robots.txt file, password protecting your pages, and placing your site in maintenance mode.

Method 1: Hide a WordPress Page from Search Engines Using AIOSEO

You can hide a WordPress page from Google by using a WordPress plugin like All in One SEO (AIOSEO). It’s one of the most popular SEO plugins used by over 2 million websites. This method is the easiest and recommended for beginners.

First, you need to install and activate the AIOSEO plugin. For more details, see our step by step guide on how to install a WordPress plugin. The free version of AIOSEO also comes with the ability for you to hide pages from Google.

After installing and activating the plugin on your WordPress site, you need to edit the page or post that you want to hide from Google.

In the WordPress content editor, simply scroll down to the AIOSEO Settings and click on the ‘Advanced’ tab. You will now see a ‘Robots Setting’ option and a toggle that says ‘Use Default Settings’. You need to click on the toggle to switch off the robots setting.

AIOSEO Settings in WordPress Editor

Once you do that, more options will appear under Robots meta. To exclude the page from appearing in Google search results, you need to check the box that says ‘No Index’.

Click on the No Index Checkbox

After you select that, you can save or publish your page. AIOSEO will add a line of code that tells the search engines like Google to not index this page.

The automatic code will look like this:

<meta name="robots" content="noindex"/>

Aside from excluding specific pages, AIOSEO also lets you hide different sections of content from appearing on Google. To do that, go to All in One SEO » Search Appearance from your WordPress admin area.

Search Appearance AIOSEO

You will see different tabs for different content sections, including Content Types, Taxonomies, Media, and Archives.

Now click on any of these tabs and set the ‘Show in Search Results’ setting to ‘No’.

Show in Search Results Setting

If you want to hide media files from Google, then you will need AIOSEO Pro version to view the options under the ‘Media’ tab.

After that, click the ‘Save Changes’ button.

AIOSEO will add a ‘noindex’ HTML meta tag, so the search engines will not index the content, and it will not appear in the search results. It will also exclude the content from your XML sitemaps.

Method 2: Hide a WordPress Page from Search Engines Using robots.txt File

This method requires you to edit the robots.txt file, which is a configuration file that provides instructions to search engine bots. For more information, take a look at our guide on how to optimize your WordPress robots.txt for SEO.

Adding incorrect instructions in this file can have a negative effect on your site’s SEO, which is why we don’t recommend this method to beginners.

You can edit the robots.txt file by connecting to your website using an FTP client or file manager in your WordPress hosting cPanel and navigating to the root directory of your website.

You will need to add these lines to your robots.txt file:

User-agent: *
Disallow: /your-page/

The user-agent line allows you to target specific bots. We are using an asterisk sign to include all search engines. The next line defines the part of the URL that comes after your domain name.

Now let’s assume that you want to hide a blog post with a URL like this:

http://example.com/2016/12/my-blog-post/

Here is how you will add this URL to your robots.txt file:

User-agent: *
Disallow: /2016/12/my-blog-post/

Don’t forget to save your changes and upload robots.txt file back to your server.

There are some disadvantages to using robots.txt to hide content. First, keep in mind that robots.txt file is publicly accessible. That means anyone can access it directly to see if there are any pages you are trying to hide.

Second, while most search engines follow the instructions in robots.txt file, other crawlers and bots may simply ignore it and index those pages anyway. These bots crawl the web to spread malware, target websites, and harvest information like email accounts and phone numbers.

Method 3: Password Protect a Post or Page in WordPress

This method uses a different approach. Instead of asking search engines not to index a page, you can simply password protect it, so that it is only visible to users with the password.

WordPress comes with a built-in feature to password protect posts and pages. Simply edit the post or page that you want to protect. Under the ‘Document’ setting in your WordPress editor, click on the link next to the ‘Visibility’ option.

Edit Visibility Options

This will show the visibility options available in WordPress where you can make a post or page public, private, or password protected.

Private posts are only available to logged in users who have at least an editor user role on your website. Password protected posts can be seen by any visitor who has the password.

You need to click on the ‘Password Protected’ option and then enter a strong password.

Password Protect WordPress Page

Once you publish or update the post or page, visitors who try to access it will be asked to enter the password to view the content.

Password Protected Page

For more detailed instructions, see our guide on how to password protect posts and pages in WordPress. If you’re looking to create and sell online courses, then we recommend using a proper platform like MemberPress which comes with advanced content protection features.

Method 4: Hide a WordPress Site Until It Is Ready

You might want to hide your WordPress site from Google and the public when you are building it, redesigning it, or doing major theme and plugin updates. The easiest way to do this is to place your website in maintenance mode using a plugin like SeedProd.

First, you need to install and activate the SeedProd plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Note: There is a free version of SeedProd available as well that you can use, but for this tutorial, we’ll show the Pro version since it has more features.

Upon activation, head over to the SeedProd » Settings page to enter your license key. You can find this information under your account on the SeedProd website.

Enter Your SeedProd License Key

Next, you need to navigate to SeedProd » Pages. Here you should look for the ‘Maintenance Mode’ page and switch the toggle from ‘Inactive’ to ‘Active’.

Switch the Maintenance Mode Toggle to Active

After that, you’ll need to click on the ‘Set up a Maintenance Mode Page’ button. This lets you create a temporary page that your visitors can see while your website is hidden.

First, you need to choose a template for the page. When you hover your mouse over a template you’ll see two icons. You can preview the template by clicking the magnifying glass icon, and select it by clicking the red tick icon.

Choose a Maintenance Mode Template

After selecting a template you’ll be taken to the SeedProd drag and drop page builder to customize your maintenance mode page. Here you can edit the text and upload a custom background image to match your branding.

Use the SeedProd Drag and Drop Page Builder to Customize the Maintenance Mode Page

You can also add new blocks from the left column. For example, you might like to add a timer that counts down to the launch of your website.

Once you’re happy with the page design you need to publish it. Simply click the drop down menu button next to ‘Save’ and then click ‘Publish’.

Click the Drop Down Menu Button Next to Save and Click Publish

You’ll be shown a message that your page has been published. Your website is now hidden from Google and the public and only the maintenance page is visible.

Your Page Has Been Published

You can click the ‘See Live Page’ button to view your maintenance page. This is how it looks on our demo website.

SeedProd Maintenance Mode Page Preview

Once you’re ready to show your website to the world, then simply visit SeedProd » Pages again and switch the Maintenance Mode toggle from ‘Active’ to ‘Inactive’.

We hope this tutorial helped you learn how to hide a WordPress page from Google. You may also want to see our guide on how to install Google analytics in WordPress to see user stats, and our comparison of the best drag and drop page builders for WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

21 CommentsLeave a Reply

  1. How long after i put the no-index meta tag in the AIOSEO settings does it take to re-index the page again, if in future i want the page to be shown publicly on google searches?

  2. YOAST is definitely the easiest way to get it done. No code, just change the setting and your good. This was helpful for not indexing pages such as Privacy Policy or Terms pages which are pretty useless to index in Google.

  3. If I set a page to Private visibility, will the page still be indexable for SEO purposes but not appear on the site map?

  4. After you make these changes how long does it take for the page to stop showing up on Google searches?

  5. For the Yoast plugin, the settings look different than what is pictured. So I’m assuming Yoast changed how it looks from when this was originally posted.

  6. Curious as to how to hide an opt-in PDF file (media) from google searches. The above seems to reference just pages/posts. Would I have to attempt Method #2 above to do so? Thanks!

    • For what you’re wanting, you would likely need to use method #2 from the article.

      Admin

  7. Thanks for the article. I want google to noindex my site’s member pages. You can follow the steps to make the ‘member’ page noindexed. However, the single member pages still appear. Can you recommend any solutions?

    Thanks

  8. Hi,
    I want to noindex some of the pages. I think yoast method is best. But can you tell please how many days it will take to remove these pages from google search results?

  9. Hi. I have password protect pages on my website that are somehow showing up in Google Search engine results and circumvent the password and shows the viewer the pages without need to provide password.

  10. thanks for the great article. I’m wondering which of these methods is preferred or do you need to do more than one of them for a pricing page for instance?
    I’d like to send folks to a private page and know it isn’t on google or any other search engine. Kim’s message on passwording was disconcerting. I’d like to hear your comments on that as well.

    • Hi Karen,

      You can use the method 1 to be absolutely certain that Google will not index the page. This method will make your page noindex for Google as soon as it is published.

      Admin

  11. How do I hide a page that I created for the mobile site from showing up in my search list? I don’t want customers to see the mobile page on it.

  12. If I’m understanding correctly – if you use method 3 and password protect a page, it is still indexed, just not available for people to view without knowing the password.

    Recently my colleague created a draft page for another colleague to review (using a password) thinking that it would be hidden. However, I got a message on my phone from Google showing me there was an update on a website I recently visited – but with a note that it was password protected. This is not something I’d like anyone else to get as it would be annoying rather than useful since they wouldn’t be able to access the page. So really i don’t think it is enough to password protect something – we should probably also be doing one of the first two methods to keep it hidden. Would you agree?

  13. Thanks for a great article. This is simple, concise, and very clear. You have been bookmarked! Cheers.

  14. I’ve deleted more than 20 posts from my WordPress blog. But, yoast submitted XML sitemap to google and it got indexed in search results. Whenever i search my domain name the deleted page will appear…

    If I enter into that page. It shows 404 content not found..!!

    Is there any solution to get rid of it soon?

Leave a Reply to Justin Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.