Try For Free

How to prevent search engines from indexing WordPress search result pages?

You can prevent search engines from indexing your search result pages by making sure they can't access them.

By including the following directives in your robots.txt file, you prevent all search engines from indexing search result pages on your WordPress website, assuming:

  1. no changes were made to search result pages' way of functioning and
  2. that no search result pages are already indexed.

Here's what you need to put in your robots.txt:

User-agent: *
Disallow: /?s=
Disallow: /search/

If for whatever reason your robots.txt changes, and the search result pages become accessible to search engines it's great if you have a second line of defense. Therefore, we highly recommend that you implement the <meta name="robots" content="noindex"> attribute on your search result pages.

Audit your robots.txt and find out right away!
Read the full Academy article to learn everything about Robots.txt for SEO: The Ultimate Guide
Share Article Details

Ready to maximize your website's potential?

Try Conductor Intelligence free for 30 days
TrustRadius logo
G2 logo
SoftwareReviews logo