I have a multi language site. Structure of my site is like this:
/index.php
----/en/login.php
----/some other language/login.php
At index page, user choose his language, language is saved in cookie. From login page user can go back to index and change his language. Now, that’s the root of my problem:
When user, at “login” page clicks “change language”, he is directed to “deleteLangCookie.php”. That php is simple, looks like this:
<?php
if(isset($_COOKIE['lang']))
setcookie("lang", "", time()-60*60*24*100, "/");
header('Location: ../index.php');
?>
As you can see – 5 lines, pure php. Now, for some time Google webmaster tools complains that “deleteLangCookie.php” HAS THE SAME TITLE as “index.php”. How’s that? “deletelangunage” is not included in “index.php”, it’s just “a gate” to “index.php” when user clicks “change language button”.
“DeleteLangCookie.php” IS NOT indexed, it’s removed from cache and disallowed by robots!
Please help!
If it is not indexed, it is not a problem. The duplicate titles is only to help you, not a penalty by google.
Maybe try this:
Add a 301 to your header. That way you’re saying “this is not a real url”, and google might skip the page alltogether. The “deleteLangCookie.php” url is not a “real” url to land on anyway: it does something, but then always redirects you to another place.