InfoPhilicHow toHow To Block Your WordPress Site's Internal Search Pages

How To Block Your WordPress Site’s Internal Search Pages

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.

You'll also like:
Continue to the category
Amit Malewar
Amit Malewarhttps://www.infophilic.com/
Amit Malewar has been the tutorial writer since 2013. His passion for helping people in all aspects of technology flow through the expert coverage he provides. In addition to writing for InfoPhilic, Amit loves to read and try new things.

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.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

GET STARTED
DEALS

Cloudways Hosting

Load WordPress site in as fast as 37ms!
spot_img