{"id":110256,"date":"2020-09-01T05:53:00","date_gmt":"2020-09-01T10:53:00","guid":{"rendered":"https:\/\/wpengine.com\/?post_type=resource&#038;p=110256"},"modified":"2021-11-04T09:02:08","modified_gmt":"2021-11-04T14:02:08","slug":"how-to-hide-wordpress-posts","status":"publish","type":"resource","link":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-hide-wordpress-posts\/","title":{"rendered":"How to No-Index a WordPress Post and Hide it From Google"},"content":{"rendered":"\n<p>Normally, you don\u2019t want your web pages to be hidden from search engines. You\u2019ll usually want your website and its content to be as visible as possible. However, there are exceptional circumstances when you\u2019ll need to hide a page from Google and other search engines.<\/p>\n\n\n\n<p>You may do this to protect private pages, restrict paid content, or encourage search engines to ignore pages you won\u2019t need to keep around for long \u2013 such as content built to promote one-time events. The good news is that whether you\u2019re comfortable making changes manually to your website or not, there are methods you can use to hide a WordPress page.<\/p>\n\n\n\n<p>In this article, we\u2019ll discuss how to hide (or \u2018no-index\u2019) a WordPress page from Google and other search engines. Let\u2019s get started!&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Pros\/Cons of Hiding a Page<\/h2>\n\n\n\n<p>Before we go any further, it\u2019s important to note that we\u2019ll use the term \u2018page\u2019 throughout this article. However, everything we\u2019ll be discussing also applies to posts and other web content.<\/p>\n\n\n\n<p>As with anything else, there are pros and cons to hiding a page from search engines. The benefits include that you can:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Track website analytics to determine where traffic is coming from.<\/strong> You may want to keep your analytics clear of search engine traffic, in order to get an exact picture of how your marketing campaigns are performing.<\/li><li><strong>Hide short-term events.<\/strong> Pages created for short-term purposes, such as for webinars, conferences, or product launches, do not generally need to be indexed. If you don\u2019t hide these pages, they might still show up in search engine results years after your event is completed.<\/li><li><strong>Promote a specific page on your website.<\/strong> If you have multiple SEO-optimized pages with similar content, search engines will prioritize one of those pages. Therefore, if you\u2019ve created a page specifically designed to promote a product, you\u2019d want all available traffic routed to it. You can do this by hiding the other pages.<\/li><\/ul>\n\n\n\n<p>However, there are also a few drawbacks:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Hidden pages won\u2019t be found through searches.<\/strong> This is an obvious disadvantage. Hiding your pages means they won\u2019t be indexed by search engines, and users won\u2019t find them by conducting searches.<\/li><li><strong>Not everyone will respect your no-index request.<\/strong> Although most search engines will respect your request to hide certain pages, malicious bots and crawlers will not. Examples include bots that spread malware or steal personal information like email addresses, phone numbers, and more.<\/li><\/ul>\n\n\n\n<p>It\u2019s up to you to decide whether the pros outweigh the cons for your specific content. In case you decide you do want to hide one or more pages from search engines, let\u2019s look at three methods that will get the job done.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method 1: Using Robots.txt<\/h2>\n\n\n\n<p>Our first method includes editing <a href=\"https:\/\/wpengine.com\/support\/read-use-robots-txt\/\" target=\"_blank\" rel=\"noreferrer noopener\">your site\u2019s <em>robots.txt<\/em><\/a> file, to include a command telling search engines not to index your page. This file is located in the root directory of your website\u2019s server. It contains instructions that tell search engines how to find and extract content from your site.<\/p>\n\n\n\n<p>We\u2019ll use one of four available commands, <em>Disallow<\/em>, to hide a page. Note that you can find and edit your site\u2019s <em>robots.txt<\/em> file <a href=\"https:\/\/wpengine.com\/resources\/how-to-access-wordpress-files-using-sftp\/\" target=\"_blank\" rel=\"noreferrer noopener\">via File Transfer Protocol (FTP)<\/a>. Another option is to access the file manager in cPanel through your hosting provider.<\/p>\n\n\n\n<p>Once you\u2019ve located the relevant file, you\u2019ll need to add the following lines to it:<\/p>\n\n\n\n<p><code>User-agent: *<\/code><br><code>Disallow: \/your-page\/<\/code><\/p>\n\n\n\n<p>Each of those lines contains a \u2018key\/value\u2019 pair. For example, \u201cUser-agent\u201d is the key on the first line, and the asterisk is the value.<\/p>\n\n\n\n<p>The asterisk indicates that your commands should be applied for all search engines. If you wanted, you could instead <a href=\"https:\/\/support.google.com\/webmasters\/answer\/6062596?hl=en\" target=\"_blank\" rel=\"noreferrer noopener\">restrict this command to just Google<\/a>:<\/p>\n\n\n\n<p><code>User-agent: Googlebot<br>Disallow: \/your-page\/<\/code><\/p>\n\n\n\n<p>The second line contains the link to the page you\u2019d like to hide. You\u2019ll want to replace \u201c\/your-page\/\u201d with the URL of the relevant page. Once you\u2019re done, make sure to save the file and upload it back to your server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method 2: Using a Plugin<\/h2>\n\n\n\n<p>Our second method involves using the <a href=\"https:\/\/wordpress.org\/plugins\/wordpress-seo\/\" target=\"_blank\" rel=\"noreferrer noopener\">Yoast SEO<\/a> plugin. This is arguably more straightforward than the previous technique.<\/p>\n\n\n\n<p>Once you\u2019ve installed and activated the plugin, find the page you\u2019d like to hide by navigating to <em>Page &gt; All Pages<\/em> or <em>Posts &gt; All Posts<\/em>. You\u2019re looking for the collapsed <em>Advanced<\/em> tab in the SEO meta box, below the page editor:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/cFZ-tivYefE2PrRWVnhrplh2lEVgI68T0VXqccyuOUY1yTAt5BUCNiMcEvLOdx2B3PVHiJIEWAW-S8An-0cQILnMpp9VRK1o5T63hk90-nHx4aZhsiPcX2g-xMr-2ZJ231HIOoIr\" alt=\"Screenshot of how to use a plugin to no-index a WordPress post\"\/><\/figure>\n\n\n\n<p>Once you find the <em>Advanced<\/em> tab, you\u2019ll want to select \u201cNo\u201d from the drop-down menu under <em>Allow search engines to show this Page in search results?<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/m-cSor9AkIWfCYYN47KArHCXIGxRnZXfk5IH4lpNfxI5tvtEb0sTwUZ5SrjvlEYC1mqXgw1AN6PQUgb-RKaFo6DrA2h0loj4kuruvsYciGYf-RAxaEWqjZYS1BQ6T3K4eLa0KZrd\" alt=\"Screenshot of disallowing search engines to find a post in WordPress\"\/><\/figure>\n\n\n\n<p>Make sure to save your page, or hit the <em>Update<\/em> button if it&#8217;s an existing page. Now, search engines will be informed not to index your page or to de-index it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method 3: Password Protecting the Page<\/h2>\n\n\n\n<p>WordPress provides a feature that enables you to protect a page by setting a password for it. This means that only users with the password can access that page. Note that if your goal is to hide content from visitors rather than search engines, this is the recommended method.<\/p>\n\n\n\n<p>The two techniques discussed above will only prevent your page from showing up in search results. Anyone with the correct URL can still access it. So you may want to use this method in combination with one of the other options.<\/p>\n\n\n\n<p>To set a password for a page, open it up in the WordPress editor. Then look for the <em>Status and visibility<\/em> section under the <em>Document<\/em> tab. By default, pages are set to \u2018public\u2019, so you\u2019ll want to click on the <em>Public<\/em> link right next to <em>Visibility<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/c1ILSgm2ytrgTlYxp4edpnNN-hHQ-o05cfRhkjQJcYOOS51wRGvLa2oCeT0GokXjWpFVkBA8PQJWyHLxeh3Bllu4d_LzFvbT-mhCJW2Brnjh08aE8cBtld6nCC5jOsSjVFyX7ixR\" alt=\"Screenshot of how to set up a password for a WordPress post\"\/><\/figure>\n\n\n\n<p>Next, select the option labeled <em>Password Protected<\/em>, and enter a password into the accompanying text input box:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/6iZ1H5Ycb8UJGzsfnfyCyhXo2yZBVApkzWMSw4Qs6aDVmgMrrRj7vjGoCEzO0q2tD02D4c9Wtw_8USmBxZGfo2giCjdr1sd0PtaKe0bIjW_OZZVV_bUQpKUL76GCRqUPcnzVS7lL\" alt=\"Screenshot of making a WordPress post password protected \"\/><\/figure>\n\n\n\n<p>You should notice that the link has changed from <em>Public<\/em> to <em>Password Protected<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/um_8_VLnO433NSgc830JPDq5-OijvOQQM80u6H0cAlimSJmo0lvtnTmvvvHa6La2iiumAaAOL6Emq3mVk3IvhTrHA-tygZDQUxazyQ3_uecszTQZPfR3yeqPtU21KtjhqGVzE2Ra\" alt=\"Screenshot of how to set a link from public to password protected \"\/><\/figure>\n\n\n\n<p>Now when someone tries to visit this page, they\u2019ll need to enter a password before they can view it:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/4Wp45GFJoiP2iCpF0FOFiybWp53GN8uRjP3REZdjkucsMoILnKTC3rOXL0zEcRwxb71ChvcDyoiYp41P00_DYb1zcIxvhsCTuxSnRSyco-ogBixlfHVjK9wMlcSv8QkCa40w4Xj8\" alt=\"Screenshot of where to enter a password to view a password protected WordPress post\"\/><\/figure>\n\n\n\n<p>You\u2019ll want to ensure that you <a href=\"https:\/\/wpengine.com\/support\/strong-passwords\/\" target=\"_blank\" rel=\"noreferrer noopener\">use a strong password<\/a> here, so the page can\u2019t be broken into by malicious users.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Stay in Control of Your Site With WP Engine<\/h2>\n\n\n\n<p>At times, you may need to restrict access to paid content, hide pages you\u2019ll only need in the short term, or prioritize certain pages on your website. No matter what your reason might be, you can easily hide your pages from search engines using multiple methods.<\/p>\n\n\n\n<p>Staying in control of your WordPress website can be a challenging enterprise. However, with <a href=\"https:\/\/wpengine.com\/plans\/\" target=\"_blank\" rel=\"noreferrer noopener\">quality hosting<\/a>, <a href=\"https:\/\/developer.wordpress.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">top-notch resources<\/a>, and the right <a href=\"https:\/\/wpengine.com\/secure-wordpress-hosting\/\">WordPress security<\/a> solutions, you\u2019ll be on the right track to creating an incredible digital experience!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Normally, you don\u2019t want your web pages to be hidden from search engines. You\u2019ll usually want your website and its content to be as visible as possible. However, there are exceptional circumstances when you\u2019ll need to hide a page from Google and other search engines. You may do this to protect private pages, restrict paid<span class=\"tile__ellipses\">&hellip;<\/span><span class=\"tile__ellipses--animated\"><\/span><\/p>\n","protected":false},"author":297,"featured_media":110257,"template":"","resource-topic":[904,912,898],"resource-role":[896],"resource-type":[916],"class_list":["post-110256","resource","type-resource","status-publish","has-post-thumbnail","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To No-Index A WordPress Post | WP Engine<\/title>\n<meta name=\"description\" content=\"Want to hide a WordPress page from search engines? Learn how to no-index a post with the WP Engine guide.\" \/>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To No-Index A WordPress Post | WP Engine\" \/>\n<meta property=\"og:description\" content=\"Want to hide a WordPress page from search engines? Learn how to no-index a post with the WP Engine guide.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-hide-wordpress-posts\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Engine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpengine\" \/>\n<meta property=\"article:modified_time\" content=\"2021-11-04T14:02:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/09\/shutterstock_350982161-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1100\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@wpengine\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-hide-wordpress-posts\/\",\"url\":\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-hide-wordpress-posts\/\",\"name\":\"How To No-Index A WordPress Post | WP Engine\",\"isPartOf\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\"},\"datePublished\":\"2020-09-01T10:53:00+00:00\",\"dateModified\":\"2021-11-04T14:02:08+00:00\",\"description\":\"Want to hide a WordPress page from search engines? Learn how to no-index a post with the WP Engine guide.\",\"breadcrumb\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-hide-wordpress-posts\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-hide-wordpress-posts\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-hide-wordpress-posts\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wpengine.com\/case-studies\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resources\",\"item\":\"https:\/\/wpengine.com\/case-studies\/resources\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to No-Index a WordPress Post and Hide it From Google\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\",\"url\":\"https:\/\/wpengine.com\/case-studies\/\",\"name\":\"WP Engine\",\"description\":\"Managed Hosting for WordPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/3a22232b01de39dcf588fb8e421c0521\",\"name\":\"Erin Myers\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cd881e115bc28c81642ec61752db9981ece9ee8b4c81498a9b6276b9cdcaf5e6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cd881e115bc28c81642ec61752db9981ece9ee8b4c81498a9b6276b9cdcaf5e6?s=96&d=mm&r=g\",\"caption\":\"Erin Myers\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To No-Index A WordPress Post | WP Engine","description":"Want to hide a WordPress page from search engines? Learn how to no-index a post with the WP Engine guide.","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"How To No-Index A WordPress Post | WP Engine","og_description":"Want to hide a WordPress page from search engines? Learn how to no-index a post with the WP Engine guide.","og_url":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-hide-wordpress-posts\/","og_site_name":"WP Engine","article_publisher":"https:\/\/www.facebook.com\/wpengine","article_modified_time":"2021-11-04T14:02:08+00:00","og_image":[{"width":1100,"height":500,"url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/09\/shutterstock_350982161-1.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_site":"@wpengine","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-hide-wordpress-posts\/","url":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-hide-wordpress-posts\/","name":"How To No-Index A WordPress Post | WP Engine","isPartOf":{"@id":"https:\/\/wpengine.com\/case-studies\/#website"},"datePublished":"2020-09-01T10:53:00+00:00","dateModified":"2021-11-04T14:02:08+00:00","description":"Want to hide a WordPress page from search engines? Learn how to no-index a post with the WP Engine guide.","breadcrumb":{"@id":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-hide-wordpress-posts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/case-studies\/resources\/how-to-hide-wordpress-posts\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-hide-wordpress-posts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/case-studies\/"},{"@type":"ListItem","position":2,"name":"Resources","item":"https:\/\/wpengine.com\/case-studies\/resources\/"},{"@type":"ListItem","position":3,"name":"How to No-Index a WordPress Post and Hide it From Google"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/case-studies\/#website","url":"https:\/\/wpengine.com\/case-studies\/","name":"WP Engine","description":"Managed Hosting for WordPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/3a22232b01de39dcf588fb8e421c0521","name":"Erin Myers","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cd881e115bc28c81642ec61752db9981ece9ee8b4c81498a9b6276b9cdcaf5e6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cd881e115bc28c81642ec61752db9981ece9ee8b4c81498a9b6276b9cdcaf5e6?s=96&d=mm&r=g","caption":"Erin Myers"}}]}},"acf":[],"grid_image_url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/09\/shutterstock_350982161-3.jpg","media-type":{"term_id":916,"name":"Article","slug":"article"},"role":"<strong>Roles:<\/strong> Developer","topic":"<strong>Topics:<\/strong> Marketing, Performance, Scalability","_links":{"self":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource\/110256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource"}],"about":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/types\/resource"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/users\/297"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media\/110257"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media?parent=110256"}],"wp:term":[{"taxonomy":"resource-topic","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-topic?post=110256"},{"taxonomy":"resource-role","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-role?post=110256"},{"taxonomy":"resource-type","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-type?post=110256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}