How To Block Your WordPress Site’s Internal Search Pages

Join InfoPhilic Community!

Let's build a community to help & encourage each other to grow!

Internal search pages create a large number of new URLs. Hiding them from Google makes worth. Here are 2 effective ways to hide them search engine.

Most of the bloggers use Google Custom Search on their website. But they don’t know, how problematic it is. It’s important to note that the search page is not a “part” of the website and that it generates content based on the search query. Even if it’s not the part of website, search engines still index results pages that create a large number of new URLs. This causes Googlebot having trouble in indexing your site.

In real, Google considers such pages of lower quality than your real site. Thus, it creates a bad impression of your site. But, that doesn’t really means these pages are useless, but, it will be better that you block them.

10 years ago, Google asked all webmasters to block these pages in their sites’ robots.txt.

Matt Cutts officially wrote in 2007, “Typically, web search results don’t add value to users, and since our core goal is to provide the best search results possible, we generally exclude search results from our web search index. (Not all URLs that contains things like “/results” or “/search” are search results, of course.)”

And now, even after 10 years, nothing has changed in their policy. The Google also suggests that webmaster can manage to crawl of infinite spaces such as search result pages by using the robots.txt file.

Blocking Internal Search Pages:

There are two ways to block your site’s internal search pages:

  1. As you are on WordPress, I guess, you are definitely using Yoast SEO plugin. This is most easy and recommended way.
  • Go to Posts >> Add New >> Scroll down to the Yoast SEO meta box below the post editor and click on the Advanced settings button.

It allows you to add meta tag robots to your blog posts or pages. Using the robots meta tag, you can tell search engines not to index or follow a page.

Block Your WordPress Site's Internal Search Pages

  • Now, select noindex for Meta robots index option.
  • Next, click on nofollow for Meta robots follow’ option.
  • Click on Save.

Yoast SEO will now add this line of code to your post or page:

<meta name="robots" content="noindex,follow"/>

This code will tell search engines not to follow or index this page.

2. You can also block your site’s internal search pages through the robots.txt file.

  • Open your site’s robots.txt file.
  • Add following lines:
User-agent: *
Disallow: /your-page/

First line targets with asterisk target specific bots for all search engines.

The next line defines the part of the URL that comes after your domain name.

  • Save your changes and upload the robots.txt file back to your server.

That’s all.

I hope this article aid you in hiding WordPress search pages from Google. I recommend using noindex- nofollow method at first. It will work best as compare to 2nd method. Also, read why Google hates your website and how you can fix it.

Do share your insights in the comments section below.

Subscribe to our newsletter

To be updated with all the latest news, offers and special announcements.

Comment Policy: Your words are your own, so be nice and helpful if you can. Please, only use your real name and limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.


Please enter your comment!
Please enter your name here


Start WordPress Blog: Ultimate Guide For Beginners

Here is our step by step guide for beginners to start a WordPress blog.

Top 6 Best WordPress Theme Frameworks

There are many websites themes which are created by using a framework. Likewise, WordPress Theme frameworks also becoming so popular. The framework allows you...

The Most Essential WordPress Plugins

Here, I have listed some excellent plugins which will surely add more features and new functionality to your WordPress blog.

Tips to Speed Up WordPress Performance

Here, I am sharing some tips to speed up WordPress performance. All you need to modify .htaccess file on your server and add some plugins.

The Ultimate Guide to Harden WordPress Security

Learn how to improve WordPress security. Here are some basic security concepts that will help you to harden WordPress security.

How to Setup CloudFlare Free SSL for WordPress Blog

Google has announced that they will count HTTPS as a ranking factor which means if you using HTTPS you will get a higher position...



MyThemeShop builds the fastest WordPress themes on the market!


Get almost 100% PageSpeed on Newspaper theme

The newspaper theme is the most popular premium theme for a self-hosted WordPress blog. The theme is developed by team tagDiv. You...

How to Remove jQuery Migrate in WordPress?

jQuery Migrate greatly simplifies the process of moving older jQuery code to a higher jQuery version by identifying deprecated features. It then restores deprecated...

Tips to Speed Up WordPress Performance

Here, I am sharing some tips to speed up WordPress performance. All you need to modify .htaccess file on your server and add some plugins.

How to Properly Delete a WordPress Post or Page?

You sometimes want to delete a page from your site for many reasons. When you taking a step forward, you are going to remove...

How to Fix Failed to Open Stream Error in WordPress

When WordPress.Org releases a new update to it’s WordPress standalone CMS (Content Management System) for that you may have set your website to get...

How to Prevent Invalid Activity

Publishers expect that their content should be viewed by legitimate consumers. However, criminal organizations have attacked the digital ad ecosystem with malware and other methods that...