Community & Support

Small SEO twist for pagination in drupal

Was just checking my Google webmastercentral, to find out that Google complained about too many similar title tags. Besides different problems i could see that in my configuration paginated nodes use all the same title tag. So i figured out this little template snippet to solve the problem:

<?php
print $head_title
?>

replaced by

<?php
print $head_title; if($_GET['page']) {echo ' | Page '.($_GET['page']+1);}
?>

It basically looks for the "page" parameter in the url and if it's there, it adds a ' | Page x' to the title tag. I used ($_GET['page']+1) because for drupal the second page got 'page=1' as parameter.

Sure, it's a bit quick and dirty, a template.php twist would be cleaner.

Comments

Good suggestion,

Good suggestion, thanks.

---
Yuriy Babenko
www.yubastudios.com

I'm sceptical about this

I'm sceptical about this approach, here's why...

The page titles will only differ by one or two characters, and those characters are numbers - likely to have nothing to do with the actual page content. It also introduces the keyword "Page" into every title, so now each page is optimised for the keyword "page" - if this is irrelevant to the content then at the very least its a waste of time, at worst (for example if you are running adsense) it will skew the ad targeting etc etc.

For example, lets say you the category "Porsche", page title looks like this "Porsche" - and we're targeting adsense ads for Porsche, but with your solution, the page title is now "Porsche | Page 2" - so what is google to target? I'll beat my bottom dollar that I get better targeted ads with just he word "Porsche".

The main point being this - what's worse, a few warnings in Google webmaster tools, or wasting valuable Page Title characters on the keyword "Page"? We all know the big search engines only index the first 60 to 64 characters, so I want to use them all for highly targeted keywords.

So while its a groovy solution to something loads of people ask about, frankly, I'll live with the warnings, as we have thousands of pages in the index (140k +) and some of our highest ranking pages have titles such as "Technology News" and the URL is /technology?page=457

it is wrong to assume that

it is wrong to assume that all the words in the title have to be a target you are trying to rank for. if google display this as an error in webmaster tool, i guess there must be a reason they complain.
nor did i say that it's impossible to get good ranking with that webmaster tool error.

it's more about a clean way to work, avoiding your customers to complain about webmaster tool errors and giving the visitor a bit more orientation.

i'm still conviced my mod is an improvement after all.

Hmmm, making a bold claim as

Hmmm, making a bold claim as to what is right and what is wrong regarding the content of Page Titles would indicate you have some pretty heavy weight data to back that up? The 3 years worth of keyword data we have collected certainly tells us a different story.

nobody click here