7

I have node view which has pager with URL parameter "page". I want Google bot crawls all the pages ( page=1 page=2 page=3... ) but regard all of them as just one and only the first page (without parameter "page") should appear on the search result.

On the webmaster setting page I have set URL parameter for "page" as below but now I'm getting duplicated title and description.

How does this parameter affect page content: Paginates
Which URLs with this parameter should Googlebot crawl: Every URL

What's the best way to configure URL parameter for Views "page" on Google Webmaster Tools?

3 Answers 3

0

There is no "best way" I think. It depends on your site niche. I have a blog and it has page=X like URL params. I have set it as "paginates" and "Crawl all pages" same as your setup. It now crawls and shows all pages. That duplicate title problem is still there at my site. I don't mind it because I didn't receive any dupe problem from Google.

If you really want to change it, you can do it in template.php level.

function THEMENAME_preprocess_html(&$vars) {
 if (isset($_GET['page']) && is_numeric($_GET['page']) && $_GET['page'] > 0){
   $vars['head_title'] = str_replace('|', '('.t('Page @pager', array('@pager' => $_GET['page'] + 1)).') |', $vars['head_title'], 1);
 }
}

This will rewrite your HTML title tag's content to "My Blog Posts (Page 2) | MyAwesomeBlog" on Pages where a pager is set. We add 1 to the pager value because when you are on page=1, it's actually the second page for human users.

0

Try Nodewords module for Drupal 6 or Meta tags for Drupal 7. These modules will allow you configure the NOINDEX and NOFOLLOW parameters for listing pages in order to get only 1st page in SERP.

3
  • 1
    The question is how to change the settings on Google Webmaster Tools, not on the Drupal site.
    – avpaderno
    Commented Aug 6, 2012 at 14:48
  • Then you have asked question in wrong forum. Commented Aug 7, 2012 at 11:07
  • I didn't ask the question. Still, this is not the answer for the asked question.
    – avpaderno
    Commented Aug 7, 2012 at 11:16
0

Unfortunately I don't see a setting in Google Webmaster Tools to do this however, you could actually do this in your robots.txt file that ships with drupal by adding at the bottom:

Disallow: /*?page=

Disallow: /?page=&*

Disallow: /?page=0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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