{"id":1655,"date":"2018-02-23T18:00:54","date_gmt":"2018-02-23T18:00:54","guid":{"rendered":"http:\/\/reseller-hosting-themes.com\/wordpress\/?p=1655"},"modified":"2018-02-19T12:20:21","modified_gmt":"2018-02-19T12:20:21","slug":"hide-a-wordpress-post-search-engines","status":"publish","type":"post","link":"https:\/\/reseller-hosting-themes.com\/wordpress\/hide-a-wordpress-post-search-engines\/","title":{"rendered":"3 quick ways to hide a WordPress post from search engines"},"content":{"rendered":"<p><img decoding=\"async\" loading=\"lazy\" class=\"alignright wp-image-1677 size-medium\" src=\"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-content\/uploads\/2017\/06\/hide-a-wordpress-post-300x225.png\" alt=\"hide a wordpress post from search engines\" width=\"300\" height=\"225\" srcset=\"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-content\/uploads\/2017\/06\/hide-a-wordpress-post-300x225.png 300w, https:\/\/reseller-hosting-themes.com\/wordpress\/wp-content\/uploads\/2017\/06\/hide-a-wordpress-post.png 640w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/>All popular search engines, including Google will allow you to hide part of your website&#8217;s content from the search results which random users will get. To do this, just use the robots.txt file from your website. Alternatively, you can use HTML meta tags.<\/p>\n<p>In this article we will guide you on how to do this in WordPress. We will explain in detail the two basic methods you can choose from.<\/p>\n<p>We will go even further and show you how to password-protect your WordPress posts and pages. You can use this instead of the aforementioned methods for controlling the visibility of your posts and pages.<\/p>\n<h2>Hide a WordPress post with Yoast SEO<\/h2>\n<p>This is the easiest and therefore the most beginner-friendly method.<\/p>\n<p>You just have to edit the specific post or webpage that you want to be invisible for search engines. To do this: scroll down to the <a href=\"https:\/\/wordpress.org\/plugins\/wordpress-seo\/\" target=\"_blank\" rel=\"noopener\">Yoast SEO<\/a> meta box which is positioned under the post editor and click on advanced settings (the gear icon).<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-1687\" src=\"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-content\/uploads\/2017\/06\/hide-a-wordpress-post-yoast-seo-1000x452.png\" alt=\"hide a wordpress post yoast seo\" width=\"600\" height=\"271\" srcset=\"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-content\/uploads\/2017\/06\/hide-a-wordpress-post-yoast-seo-1000x452.png 1000w, https:\/\/reseller-hosting-themes.com\/wordpress\/wp-content\/uploads\/2017\/06\/hide-a-wordpress-post-yoast-seo-300x136.png 300w, https:\/\/reseller-hosting-themes.com\/wordpress\/wp-content\/uploads\/2017\/06\/hide-a-wordpress-post-yoast-seo-768x347.png 768w, https:\/\/reseller-hosting-themes.com\/wordpress\/wp-content\/uploads\/2017\/06\/hide-a-wordpress-post-yoast-seo.png 1460w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Use the drop-down menu next to &#8216;Meta robots index&#8217; to select the &#8216;noindex&#8217; option. Then press &#8216;nofollow&#8217; which is positioned next to the &#8216;Meta robots follow&#8217; option.<\/p>\n<p>Now, the Yoast SEO plugin will add the following line of code to your WordPress post or page:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">&lt;meta name=&quot;robots&quot; content=&quot;noindex,nofollow&quot;&gt;<\/pre>\n<p>This code is used to inform search engines not to index the particular page and not to follow any of the links on it.<\/p>\n<h2>Hide a WordPress post with robots.txt file<\/h2>\n<p>This method includes editing of the robots.txt file. Since incorrect instructions in the robots file are likely to affect your website&#8217;s SEO, it is not a recommended method for beginners.<\/p>\n<p>The robots.txt file is a configuration file and you can add it to your WordPress-based site&#8217;s root directory. The file&#8217;s sole function is to provide instructions for search engine bots.<\/p>\n<p>You can edit the robots.txt directly from the File Manager in your hosting account. Additionally, you can use any FTP client of your choice. You will have to add the following lines:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">User-agent: *\r\nDisallow: \/your-page\/<\/pre>\n<p>These two lines are important, because the first one (user-agent) makes it possible for you to target specific search engine bots. The asterisk sign means that all search engine bots are included.<\/p>\n<p>The second line is used to show URL, which you want to hide.<\/p>\n<p>For example, if you&#8217;d like to hide a WordPress post with the following URL &#8211; <em>https:\/\/example.com\/my-blog-post-2017\/<\/em> &#8211; from search engine bots, you have to add its URL to the robots.txt file like this:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">User-agent: *\r\nDisallow: \/my-blog-post-2017\/<\/pre>\n<h2>Disadvantages of hiding content<\/h2>\n<p>Without a doubt the main disadvantage hiding content with meta tags or robots.txt is that they are both publicly accessible.<\/p>\n<p>As a result, even though the page will be hidden from the popular search engines like Google, some bots will ignore these instructions.<\/p>\n<p>This includes bots which are used to spread malware, target websites or harvest user information like e-mail addresses, phone numbers and other kinds of private info.<\/p>\n<p>Also, both methods will not prevents bots from accessing the page or &#8220;reading&#8221; the content. They will simply stop bots from saving this content to the respective databases.<\/p>\n<h2>Advantages of password-protected posts in WordPress<\/h2>\n<p>Password-protection is a native WordPress solution. It allows you to hide a WordPress post or a page from the public eye by protecting it with a password. All you need to do is edit the specific post or page that you&#8217;d like to hide from search engines.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-1688 size-medium\" src=\"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-content\/uploads\/2017\/06\/password-protected-post-wordpress-169x300.png\" alt=\"password protected post wordpress\" width=\"169\" height=\"300\" srcset=\"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-content\/uploads\/2017\/06\/password-protected-post-wordpress-169x300.png 169w, https:\/\/reseller-hosting-themes.com\/wordpress\/wp-content\/uploads\/2017\/06\/password-protected-post-wordpress-575x1024.png 575w, https:\/\/reseller-hosting-themes.com\/wordpress\/wp-content\/uploads\/2017\/06\/password-protected-post-wordpress.png 592w\" sizes=\"(max-width: 169px) 100vw, 169px\" \/><\/p>\n<p>Click on the &#8216;Edit&#8217; link which is right next to the &#8216;Visibility&#8217; option under your Publish meta box.\u00a0\u00a0This way, you will see all of the WordPress visibility options public, password protected or private.<\/p>\n<p>Public posts are available to anyone, who visits your website, while private posts are accessible only to registered users with editor privileges.<\/p>\n<p>All posts that are marked as password protected can be seen only by visitors that know the password. Remember to set a strong password \u00a0&#8211; use letters (lower and uppercase), numbers and symbols.<\/p>\n<p>Any visitors (both humans and bots) who load the page or post will be required to enter the password you&#8217;ve set in order to see the content.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Check out 3 quick ways to hid a WordPress post from search engines &#8211; using an SEO plugin like Yoast, using a robots.txt file or using password protection.<\/p>\n","protected":false},"author":1,"featured_media":1677,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-json\/wp\/v2\/posts\/1655"}],"collection":[{"href":"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1655"}],"version-history":[{"count":27,"href":"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-json\/wp\/v2\/posts\/1655\/revisions"}],"predecessor-version":[{"id":1691,"href":"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-json\/wp\/v2\/posts\/1655\/revisions\/1691"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-json\/wp\/v2\/media\/1677"}],"wp:attachment":[{"href":"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/reseller-hosting-themes.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}