If you are interested in changing the domain of your website, while not losing your search engine results or domain authority, you’re in the right place.
I have perform this operation over a dozen times. As long as you take precautions, such as 1) create site backups and 2) operate on copies of you website, you’ll be able to complete this operation too. Here are the high level steps for moving a website to a new domain.
How to Move Your Website to a New Domain
1. If the article paths on both domains are the same:
Adomain.com/my-article
Bdomain.com/my-article
You can setup a simple redirect on A:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !Bdomain.com$ [NC]
RewriteRule ^(.*)$ https://Bdomain.com/$1 [L,R=301]
2. After you verify the redirects work, tell Google the address changed using this tool:
https://support.google.com/webmasters/answer/9370220?hl=en
3. Use a “Find and Replace” plugin to change references to Adomain.com to Bdomain.com on the B site. Here are some common things I find and replace:
“Adomain.com” => “Bdomain.com”
“Old Site Name” => “New Site Name”
Do this on test.Bdomain.com first before trying it on Bdomain.com. Find and replace can wreck your site if you are not careful.