Change your domain name without having too much impact on SEO

I would like to change the domain name of my website following the development of my activity.

However, I would like to avoid having a very big impact on my SEO. So I want to proceed as follows:

  • Declare the new Domain Name in Google Search Console.
  • Change domain name in Shopify settings
  • Point the old domain name to a hosting where I declare a “.htaccess” file with the following code
RewriteEngine on
RewriteBase /
RewriteRule (.*) http://www.NewDomainName.com/$1 [R=301,L]

What do you think about that ?

Thanks in advance.