I have the following problem - my webmaster has made two domains for website – the main domain and sub-domain one, he told me it is more convenient for him to have 2 domains for the same website! He has written the main domain in robots.txt file! As a result, this domain was displayed in all search engines however the situation has been changed recently again! Now sub-domain is displayed in Google however the main domain continues to be displayed in other search engines! What would you recommend to do my webmaster to solve this problem and to have the main domain displayed in Google!
One method if you are on a UNIX based server... Do a 301 (permanent) redirect on your sub-domain address and point it to the "main" URL you want using a ".htaccess" file. Remove any entries that could block this from robots.txt. Then ensure the robots.txt on your main domain (if any) is correct and not blocking search engines crawling. Then make sure your .htaccess file is not redirecting your main domain elsewhere. Engines should then understand that your sub-domain is your old URL and index the redirected URL accordingly.
True noticed - you need to make a 310 redirect. For example, through htaccess: Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.yournewdomain.ru/$1 [R=301,L]
You see a website has been uploaded to hosting account under a sub domain, we would like to have a domain as the main domain for a website! I think if we just redirect it to a sub-domain it will not be displayed in Google! I can't understand why everything was ok earlier and actually we did nothing and Google started displaying a wrong domain e.i. sub-domain as aresult!
Couldn't you disable the subdomain in robots.txt? Otherwise use like it was said, the 301 permanent redirect, works always.