Forum Moderators: phranque
I have a site www.first.com and want to "perminantly redirect" all its pages to a new domain www.second.com. What exactly do I write inside the .htaccess file (present in the root folder of the first domain) in order to achieve this effect (thus preserving the Google PageRank of all the redirected pages from the first domain to the second domain)?
I'll GREATLY appriciate a reply that solves the problem.
First try this or something similar in your favorite SE
'301 redirect to a new site' site:webmasterworld.com/forum92/
(It will look something like the following)
RewriteRule (.*) http://yoursite.com/$1 [R=301,L]
Second
Check the Library [webmasterworld.com] and the Charter [webmasterworld.com]
Then let us know when you have something and we will be glad to help you with any issues from there. (I know the code you are looking for and how it works has been posted here on a number of occasions, so you should find it with the search.)
Justin
.htaccess of OLD site:
RewriteEngine on
RewriteRule ^(.*)$ [new-site.com...] [R=301,L]
This seems to work as I have tried it by visiting some of my old pages and finding my browser automatically going to their eqavalent in the new site (after slight delay though).
But my question is, those lines I used above in the .htaccess file, are they the ones that Google asked for and will make search engines learn that those pages have perminantly moved to the new location? (in order to preserve page rank)