Hello,
through google webmaster tool I see many duplicate urls like this:
/merchant/Spartoo/
/search.php?q=merchant%3ASpartoo%3A
How to keep only 1 page indexed and nofollow the other?
Thank you as usual ;-)
Thanks.
I cannot disallow the search.php so do you think is possible disallow only all url that begin with
/search.php?q=merchant%3A
Hi,
Yes - that should work fine - the robots.txt protocol specifies that it is simple sub-string match against the entire URL. If possible however, to avoid any ambiguity over the : character, specify it as just:
Disallow: /search.php?q=merchant
Cheers,
David.
Hi,
Unless you have a particular reason to want to enable indexing of /search.php directly, I would always keep it restricted via robots.txt, e.g.
User-Agent: *
Disallow: /search.php
However, another change you may want to make is to append the page number to the page title, as this can be another reason for duplicate title warnings. In search.php (original distribution) you will find where the title is set by the following code around line 154:
$header["title"] = htmlentities($q,ENT_QUOTES,$config_charset);
...REPLACE this with:
$header["title"] = htmlentities($q,ENT_QUOTES,$config_charset);
if ($page > 1)
{
$header["title"] .= " Page ".$page;
}
Cheers,
David.