The company has 2 domains. The legacy (Domain A) site is currently live and it was cloned from Site B, which was on a different domain. Site B was live for 4 months before abruptly being pulled. Site A had been placed as subdomain on that host and was thus captive and without access. Everything had been methodically redirected to go from Site A to Site B and it was ranking quickly and getting juice from the legacy.
Legacy domain was 'pulled' off the inaccessible host via it's registrar and we cloned Site B (structure,content etc) onto Domain A to prevent complete loss. So Domain A, our legacy domain, has been floundering because there were no server-side redirects at all.
Domain B has just been returned to us. It is still indexed and ranking, although it's been offline since late January. What would be the best course to establish proper 301s to our new site? I can redeploy a clone of that site and add redirections in WP or is it better to use .htaccess:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domainB.com$
RewriteRule ^/(.*)$ http://www.domainA.com/$1 [R=301,L]
Both domains are now on the same IP that we have full access to. We're essentially trying to establish continuity to indicate the journey of our current website from A->B->AB (but not merged because they are duplicate content aside from the url). Thanks!
Yeah I would just go for the .htaccess
option that you have there. Should work fine, no need to redirect individual pages, just send everything over to the same on domain A.