Hi all, google indexed http://www.mydomain.com/ and it updates it regularly, However it also indexed http://www.mydomain.com/main.php where my Directory is main.php (homepage) I never linked as http://www.mydomain.com/main.php but when i site:http://www.mydomain.com/ it shows http://www.mydomain.com/ and also the http://www.mydomain.com/main.php which is about 3-5 months ago cache, i found that %98 similar content and it effects the ranks surely because only my homepage is not ranking, subpages ranks are good. I have checked some competitng web-sites if they similar dublicate homepage indexing but none index as http://www.mydomain.com/homepage.html . To get rid of it, i have placed a URL reject from Google webmaster tool but it denied first since i have got a robots.txt telling to not crawl these pages but now i have a hesitation if it completely remove my homepage index. Any experiences on this?
You could do a 301 redirect from www.mydomain.com/main.php to www.mydomain.com or/and you could add in the header part for that page (where the meta tags go) <link rel="canonical" href="http://www.mydomain.com/" /> Code (markup):
I think you have not get it, main.php is my homepage [RewriteEngine on DirectoryIndex main.php] when you it just does not work or if you it gives failure because it is an nedless redirect at all
It tends to happen when your main domain or root is more exposed. The Google bot always crawls down after it crawls your root.
inthis case <link rel="canonical" href="http://www.mydomain.com/" /> Code (markup): or <link rel="canonical" href="http://www.mydomain.com/main.php" /> Code (markup): where main.php is my homepage?
since you have redirected /main.php to the domain.com/ and that is where your external links also point etc you should use <link rel="canonical" href="http://www.mydomain.com/" /> Code (markup): as that is what shows in the address bar. .... assuming it is a normal type site ... but if you PM me the url i will know better.