Reputation: 18680
I had a site in a old domain (http://domain1.com) and I move it to a new one (http://domain2.com) because the site had a good SEO position on domain1.com
I don't want to loose so I need to keep it and I think in a 301 redirection through .htaccess
file. This is the line I'd add to .htacess
file:
Redirect 301 /http://domain2.com/
But,
- Is this the right way?
- Is the line above good?
- Since I haven't the hosting (files and more) under
domain1.com
should the.htaccess
file be ondomain2.com
hosting?
Can any clear my doubts around this topics?
Upvotes: 0
Views: 206
Reputation: 7739
Yes, that is good solution. 301 is permanent redirect and is declared in standard HTTP Code. You can use, as you wrote, .htaccess
file to do that, or configure DNS Servers to autoredirect all queries to this domain (see http://help.dnsmadeeasy.com/spry_menu/http-redirection-record/). I think second solution is better, because you don't need to pay for hosting anymore.
Upvotes: 1