So I have 2 URLs that basically link to the main url using a symlink
maindomain.com
englishdomain.com -> symlink to maindomain.com
frenchdomain.com - > symlink to maindomain.com/fr
When someone actually lands on maindomain.com/index.php it will automatically redirect them to the appropriate symlink
The problem I'm having is I think it's affecting my google ranking and I'm not sure why..
this is my redirect code
$url = "http://" . $_SERVER['HTTP_HOST'];
if ( $url == 'http://www.maindomain.com' || $url == 'http://maindomain.com') {
header('Location: http://www.englishdomain.com/');
}
if ( $url == 'http://www.frenchdomain.com' || $url == 'http://frenchdomain.com') {
header('Location: http://www.frenchdomain.com/fr');
}
Is it possible that it's affecting my google ranking?