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.
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».
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.
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.
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.
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.
- Some premium WordPress plugins to make redirects
- 10 WordPress plugins to optimize the images of your blog
- Some solutions to performance issues on WordPress
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.
...
My wordpress template automatically creates the category
blocking the indexing of seo yoeas is False information as there is no yoast sign and there is no "ADVANCED" sign here information shows INCOMPETENCE AND YOU ARE ABOVE GOOGLE ENGINE GOOGLE BECOME DES UNNECESSARY WINDOWS !!!
EVEN THE ARTICLE PROTECTION PROCEDURE WITH A PWD DOES NOT WORK…. IN NO CASE THERE IS A WAY TO REMOVE THE CACHE PAGES OF GOOGLE AND MORE THAT WHEN YOU CLOSE THIS PAGE ALSO APPEARS AN AUTOMATIC PAGE THAT IS NOT INTERESTED WE TYPED ON THE SEARCH ENGINE A SPECIFIC THING AND WE WILL FIND US WITH ABSOLUTELY USELESS AND UNUSABLE INFORMATION ...
but the problem is not the problem it is the cache ... if I am not mistaken in the versions before 2020 there was the possibility of preventing google from creating a cache page by providing the previous version, which is annoying and useless for those who write why changing a page means deleting it so that it cannot be read. This is a disgusting and bogus habit of the most useless search engine in the world, ie google to go dig in the trash ... we can not find the procedure to block the creation of cache pages by google .. always this option? otherwise, it doesn't make sense to deactivate a page from the search engine if the cache is then exhausted… and the thing is ludicrous ..
Hello,
What if you didn't want the entire blog and related articles to be indexed?
Hello,
Generally, you can do this in the settings of your SEO plugin. These allow you to do it directly on the editor or everything below.
Hi Blair, I followed the steps you gave, but the Yoast plugin tells me the following: Warning: Even though you can set the meta-bots parameter here, the site is not indexed in site privacy settings. no effect.
So when I check that my page is in the index, what can I do?