Recently one of our readers asked us if it is possible to hide a WordPress page from Google. 

Sometimes you may want to hide a Google page to protect your privacy or to keep unwanted users away.

In this tutorial, we will show you how to hide a Google WordPress page without affecting the overall SEO of your website.

How to prevent google indexing wordpress page

Hide a WordPress page or article for Google

The search engine like Google allow website owners to exclude content from search results. You can do this by using the robots.txt file from your website or by using tags arches.

We will show you how to do this on WordPress using two methods. You can choose the one that works best for you.

We will also show you how to protect an article or page with a password. If you do not want to use the first two methods, then this approach will allow you to control the visibility of your articles and pages for all users.

You can go further by discovering How to prevent Google from indexing a WordPress page

1 Method: Hide a WordPress Page with Yoast SEO for Google

This method is easier and recommended for beginners.

The first thing you need to do is to install and activate the plugin " Yoast SEO ».

For more details, see our step-by-step guide on how to install a WordPress plugin.

If you are new to Yoast SEO, then check out our guide on how to install and configure the Yoast SEO plugin

Then you need to edit the post or page that you want to hide from search engines. Scroll down to the meta section " Yoast SEO »And click on the button« Advanced».

Yoast seo setup

This section allows you to add tags for robots. Using the option " Meta robots advancedYou will be able to tell search engines not to index or follow a page.

Then you have to select " noindex "In the drop-down menu next to the" Meta robots index ". After that, click on " nofollow " beside " Meta follow robots ».

You can " save / publish Your article or page.

Yoast SEO will add this line of code to your article or page:

It simply tells search engines to not track or index a page.

2 Method: Hide a page from search engines using the robots.txt file

This method requires you to edit the robots.txt file. Adding incorrect instructions to this file may have adverse effects on the SEO of your website, which is why it is not recommended for beginner users.

The robots.txt file is a configuration file that you can add to the root directory of your WordPress website. It allows a website to provide instructions to search engine spiders, hence the name robots.txt.

See also How to optimize your WordPress Robots.txt file for SEO

You can edit the robots.txt file by logging into your website using an FTP client orFile managerIn your cPanel.

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

User-agent: * Disallow: / your page /

Line " User Agent Allows you to target specific robots. We use the asterisk sign to include all search engines.

The next line defines the part of the URL that comes after your domain name.

Now, suppose 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 the robots.txt file to your server.

Disadvantages of using robots.txt file to hide content

First, you need to keep in mind that the robots.txt file is publicly available. Anyone can go directly to it to see if there are any pages you are trying to hide.

While most search engines follow the instructions in the robots.txt file, many other bots may simply ignore it.

These are the robots that explore the Web to spread malware or to collect information such as email addresses, phone numbers, etc….

By the way, if your website shows signs of slowness, discover our 10 WordPress plugins to improve the speed of your blog

If these methods are not enough for you, we suggest the latter which seems radical, but it does exactly what you expect.

How to protect an article / page with a password

We have already proposed A tutorial on that you can read. The peculiarity with this practice is that it blocks access to content to all those who do not have a password including robots.

It may be good practice, if you think that the use of robots.txt Is not effective.

If you think your blog or website has a security deficit, we suggest 3 WordPress plugins premium that you protect the latter.

1. Smart Security Tools

Smart Security Tools is a WordPress Plugin very effective in improving the security of your website. It has a set of tweaks and tools for additional protection coupled with a security advisor who can help you figure out what needs to be done.Smart security tools wordpress security plugin

The plugin integrates antiviruses such as Whole virus et Sucuri which are responsible for scanning and detecting malware on your website. You also have a security log from which you can ban certain IP addresses.

It also has a large number of premium extensions to expand the range of its features.

Download | Demo | Web hosting

2. WP Malware Scanner

WP Scanner is a daily automatic malware scanning service. Security Platform Also Offers One-Click Malware Cleanup Service and Ongoing Website Protection | No false positive. Malcare malware wordpress plugin virus scans e1546675574290

Its features are: early detection of malware, detection of hard-to-find malware, automatic one-click cleanup, scanning for malware that does not overload your server, connection protection, a firewall. web application, secure and comprehensive backups of your website, real-time malware detection, custom keywords for scanning, detailed reports, and more

Download | Demo | Web hosting

3. WP-SpamShield

WP-SpamShield is a powerful WordPress spam fighting plugin, it works in the background and does not offer any captcha on your WordPress website.Wp spamshield anti spam wordpress plugin

It allows you to protect your comments form, but also your registration form and all other elements likely to receive spam. At first this plugin was free, but today with its 4 million downloads, it has become one of the WordPress plugins the most popular spam fighters.

Your website will be much safer once you start using this plugin. As already mentioned, it does not add anything, like an annoying Captcha or a spam protection issue, but it runs in the background silently to protect your 24 / 7 website.

Download | Demo | Web hosting 

Other recommended resources

We also invite you to consult the resources below to go further in the grip and control of your website and blog.

Conclusion

Here ! That's it for this tutorial dedicated to helping you prevent Google from indexing a WordPress page. feel free to share the tip with your friends on your social networks.

If you have any suggestions or remarks, they will be welcome. We also invite you to consult our resources if you are a beginner blogger.

...