I want to move subdomain to root, and create a new root. I have root.com. I want to move it to sub.root.com and install a new Wordpress intall at root.com. Any idea how I redirect the traffic from root to sub.root without affecting the new site? Or do I just have to move, wait for the search engines to redirect and then install the new copy on root.com?
You can redirect all old inner pages to the new ones using
.htaccess with HTTP header 301, but remember not to duplicate on the new site these parts of old URLs which goes after the old domain name (like
/new-page-1/ in the example below).
RewriteEngine On Redirect 301 /old-page-1/ httр://sub.domain.tld/new-page-1/ Redirect 301 /old-page-2/ httр://sub.domain.tld/new-page-2/
You can't do this with the main page. And you'll have to wait a week or more for search engines to reindex everything.