Hello I have a wesbsite hosted by infomaniak. This website has 2 domains . domain.com and domain-bis.com. Both domains are at infomaniak. The second domain is not redirected, it just has the same dns entry and so appears in google as a separate domain. When I access the website, the domain-bis address appears in the browser... So i d like to see this desappear and have only domain.com in the results. The question is. can i go to the htaccess of domain.com and set a 301 redirection from domain-bis.com to domain.com? as they have the same dns records, it would mean that it s moved permanently to itself? what do you think?
If the two domains are hosted on the same server or even if the two aren't hosted on the same server, you can set a redirection in two ways. 1. htaccess 2. redirect tool in cPanel (that is if you're using cpanel)
Tks for your answer, so that would not hurt pagerank or indexing to have a 301 on from site b to a on the same host even if they point at the same site already
You must indicate in your Google Webmaster tool that you've set a permanent redirection. According to Matt Cutts, no, it won't hurt your page rank.
your only solution by keeping ur seo work in mind is 301 redirect. there are also tricky html and javascript that can do this but i insist u to follow 301 redirect that will be better.