Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I noticed in google that actually searches in my blog are getting indexed on multiple pages resulting in duplicate content. Suggestions on how to stop this? example

/

?s=radiofixes
/page/10/?s=radiofixes
/page/11/?s=radiofixes
/page/2/?s=radiofixes
/page/3/?s=radiofixes
/page/4/?s=radiofixes
/page/5/?s=radiofixes
/page/6/?s=radiofixes
/page/7/?s=radiofixes
/page/8/?s=radiofixes
/page/9/?s=radiofixes

I was thinking paramaters in google, but would I put to ignore?

share|improve this question
add comment

2 Answers

Read this http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html

There are several WordPress SEO plugins that can help, http://wordpress.org/extend/plugins/search.php?q=canonical&sort=

share|improve this answer
    
yeah i got all in one seo but it doesnt seem to be including searches at all –  derek Jun 11 '11 at 14:47
add comment

The real problem here is not duplicate content. The problem is that your search result get indexed which is wrong for SEO reasons. Search engines like Google explicitly ask to avoid search result pages to get indexed.

To avoid your Wordpress search result pages to get indexed in search engines, you have different options :

Easy way

Block access to robots by adding the following instruction in your /robots.txt files :

Disallow: *?s=*

This will prevent from bots to access any resources with ?s= in their URL.

Good way

Add a <meta name="robots" content="noindex, follow" /> in the <head> tag of your search result pages.

This will let bots access your search pages but will prevent from indexing.

With Wordpress SEO by Yoast plugin

Wordpress SEO by Yoast is a well known plugin for optimizing Wordpress for SEO and considered as the best SEO plugin for now by many SEO professionals (as I am).

This plugin add automatically the right <meta> on search result pages.

Without using a plugin

With header included

If you use the same header for different templates with get_header() function for instance, you will need to test if the current page is a search result page before adding the <meta> tag.

Here is the code to add in your header template (default: header.php) :

<?php if ( is_search() ) : ?>
    <meta name="robots" content="noindex, follow" />
<?php endif; ?>

Without header included

If you use a simple template with his own header, you can simply edit you search template search.php to add the <meta>tag in the <head>

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.