How To Exclude Pages and Posts from the WordPress Search

YouTube video

If you’ve ever wondered how to prevent certain content from being discovered on your WordPress site, you’ve come to the right place. I’m here to introduce you to a neat tool that does just that. But before we dive in, I want to remind you to subscribe to my blog if you’re new here for all the latest on WordPress. You’ll find more information, resources, and some helpful links in the description below.

Introducing the Search Exclude Plugin

A while ago, I stumbled upon a fantastic, straightforward plugin known as ‘Search Exclude’. After having used it on several occasions, I knew it was something I needed to share. So, here’s my mini-review and a quick tutorial on using this handy tool, with a bonus tip towards the end, so do stick around.

The Search Exclude plugin for WordPress is a simple yet effective tool that, as the name implies, excludes specified content from your site’s search results. It’s straightforward to use and works as advertised.

A Practical Demo: Excluding a Page

To better demonstrate how it works, let’s use an example. Let’s say we have a demo site, and within this site, there’s a page called ‘The Secret.’ This page is meant to be hidden, accessible only to those who have the direct link.

However, when using the site’s search function and inputting ‘secret’ as a keyword, the ‘Secret’ page appears in the results alongside other related posts. Obviously, this isn’t ideal, so here’s how we resolve it using the Search Exclude plugin.

Installing and Using Search Exclude

Go back to your WordPress admin dashboard and navigate to the ‘Add New’ link under the ‘Plugins’ menu. Search for ‘Search Exclude’ and install it, then activate it. You won’t find much on its settings page, apart from a list of pages you’re currently excluding – a handy reference tool.

Now, go back to your pages, select the ‘Secret’ page, and hit ‘Edit.’ You’ll notice a new option at the bottom titled ‘Search Exclude.’ Tick the box that says ‘Exclude this from search results,’ and hit ‘Update.’

If you go back to your website and run the search query for ‘secret,’ you’ll notice the ‘Secret’ page no longer appears in the search results. It’s that simple!

Bonus Tip: Preventing Indexing by Search Engines

Here’s a bonus tip for ensuring absolute privacy. If you want to prevent search engines from indexing your page (even if the link somehow gets leaked), you can use an SEO plugin. For example, if you have Rank Math installed, navigate to the settings.

Go to the advanced settings of the ‘Secret’ page, and you’ll notice it’s currently set to be indexed. To change this, set the page to ‘No Index, No Follow, No Archive, No Snippet, No Image Index.’ This ensures the page won’t appear in Google’s search results, even if Google knows about it.

Final Thoughts

The Search Exclude plugin is a simple, efficient tool that does its job remarkably well. It’s perfect for those who want to keep certain pages on their WordPress site hidden from public view. As always, I welcome your thoughts and comments below. Until next time!

Leave a Reply

Your email address will not be published. Required fields are marked *