Some of you may want your website to be away from Google. if you are one of them, this article is obviously for you.
Hiding a WordPress post or page from Google
You can use site’s Yoast SEO plugins and robots.txt file or HTML meta tags to keep your site away from Search engines. In this article, we will also show you how to password protect your posts and pages in WordPress.
Method 1: Hide a WordPress page from search engines using Yoast SEO
In order to hide WordPress page from search engines using Yoast SEO, follow the steps below:
- Install and activate Yoast SEO plugin.
- Now you need to go to post or page, go to Yoast SEO meta box below the post editor and click on advanced setting button. Demo picture is shown below:
- Now you need to fill the form as above (Meta robots index: ‘no index’, Meta robots follow: ‘nofollow’).
- Now save your post
(note: Yoast SEO will add this code to your post or page: <meta name=”robots” content=”noindex,nofollow”/>)
Method 2: Hide a WordPress page from search engines using robots.txt file
To hide WordPress page from search engines using robots.txt file, follow the steps below:
- Add the codes below in robots.txt file connecting through FTP client or ‘File Manger’ in your WordPress hosting cPanel.
User-agent: * Disallow: /your-page/
- The * sign in the code includes all search engines and the 2nd line defines the path in your website.
For example: ‘http://example.com/2016/12/my-blog-post/‘ be your site address. Now your code should be:User-agent: * Disallow: /2016/12/my-blog-post/
(Note: after done save and upload robots.txt file to server)
(Note: robot.txt file is a configuration file which allows website to provide instruction for search engine bots and have capabilities to effect on your site’s SEO.)
Method 3: Password protect a post or page in WordPress
In this method, you completely protect your page with a password using the inbuilt feature of WordPress. To hide WordPress page from Google or any other search, follow the steps below:
- Click on ‘Edit’ next to ‘Visibility’ option under the publish meta box, as shown in the picture below:
- You will see options like: public, private or password protect. You may choose the option as required. But we suggest you choose password protect and click on publish.
- Now, your visitors will see demo picture like shown below: