Forum Moderators: Robert Charlton & goodroi
Are you saying that Google is showing one of your inside sub level pages rather that your main domain url in its search results?
If so did you promote your sub url more than your main domain?
I.e are there many inward links pointing to your sub url than your main domain?
In this directory, I created a subdirectory that is my website's root and contains the index page as well as a subdirectory with one of my major sites.
Thus, if you google the keyword mentioned above, you normally see the domain (which forwards to the root directory) in that way: www.example.com/subpage.htm
However, today it shows: www.companycode12233344444.us/directory/subpage.htm
That sucks. I don't like that. And it hasn't happened before. Googeling other keywords leads to a normal display of the domain.
Thanks for your advice!
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
The above sorts out non-www and www URLs for the main domain. Then add additional RewriteCond and RewriteRule lines for redirecting the other domain to the correct one.