'Hiding' sensitive pages

  • Author
      • May 28, 2020 at 6:10 am #2021208

        How can I hide my lead magnet download pages from site searches?

        I have used Yoast to change the advance settings so that search engines are not indexing the pages but if someone searches for “download” whilst on my site – the ‘Thank You – here’s your download” pages show up in the results. (And anyone finding them can download the resource without having signed-up.)

        As I understand it, changing the Visibility to Private (in the standard WP settings) isn’t what I need as that restricts visibility to user roles – which is not what I want.


        • May 28, 2020 at 6:10 am #2021215

          Using an SEO plugin like Yoast is your best bet to hiding it from search. But, also keep in mind that simply setting that setting in Yoast does not immediately remove it from Google results. I’m not sure when you set that up.

          Also, you can go into Google Search Console and request to have the URL removed from search results. When you get into Console, click on “Removals” in the menu and submit a request.

          • May 28, 2020 at 6:10 am #2021218

            Thanks David – I’ll follow-up on your GSC suggestion.

            I probably wasn’t making myself clear though – my other concern is when people are already on my site and search (in this instance) for the word ‘download’ – my resource download pages will show up in the site search results.

            I can’t see how to stop that from within WordPress, Yoast or Thrive Themes.

            Any ideas?


            • May 28, 2020 at 6:10 am #2021238

              Ah, so you’re talking about the internal search engine from WordPress. Yeah, that’s different.

              In most cases, you can just exempt pages from the search altogether. Since most pages are more functional than content-rich and don’t need to be searched.

              The geek way to to search only posts (and exempt other post types like pages) is to plop this code into your theme’s functions.php file:

              //Exclude pages from WordPress Searchif (!is_admin()) {function my_search_filter($query) {if ($query->is_search) {$query->set('post_type', 'post');}return $query;}add_filter('pre_get_posts','my_search_filter');}

              You could also try this plugin to exempt only select pages:


              And if you’re using a theme where modifying functions.php is problematic (like Thrive Theme Builder), you can use this plug-in in order to inject snippets like above:


              • May 28, 2020 at 6:10 am #2021248

                Ah – OK thanks David.

                I’d rather not mess with code, so will take a look at the plugin.


                • May 28, 2020 at 6:10 am #2021294

                  David, just thought I’d let you know the Search Exclude plugin doesn’t work on my site for some reason.

                  I followed the setup instructions but that one page I specifically excluded using the plugin still appears in search results.

                  I tried on several different browers (incognito too) on two different laptops and my mobile and they all show the page.

                  Also, I noticed after intalling it the layout of my Post index page (in the WP dashboard) changes with fewer results visible on screen as the layout is ‘glitched’ slightly – so I think it doesn’t like working alongside another plugin. (I saw the same odd Posts index behaviour with my old theme – which was not being updated.)

                  I’ve looked around for alternatives to Search Exclude but can’t see anything suitable.

                  If you, or anyone else reading this, can recommend a plugin to achieve this please tell me!


              • You must be logged in to reply to this topic.