The Secret Blueprint to Changing Your Domain Name Without Losing a Single Visitor

Alternatively, you can also use a tool such as the database search and replace script by Interconnect, SQL commands inside phpMyAdmin, or WP-CLI. Double-check your input and run a preview or dry run to see if your tool supports it and avoid making mistakes!
8. Implement redirects
Now the only thing left is to set up redirects from your old to your new domain. You have two main options for that, depending on your scenario:
- Set up redirects on the old server: When you move hosting providers along with switching your domain name, you can keep your old website around, but redirect it completely. In this case, you do NOT change the DNS record of your old domain to the new host.
- Redirect on the new server: If you plan on directing your old domain to your new host, redirects have to be in place on the new server. That’s because, once you change the DNS records of your old domain, anyone who uses it will arrive at the new server and need to be redirected to the right location from there.
A plugin like Redirection is great for self-hosted sites where you will keep the old website around, at least for a while. It has a dedicated option to move your entire site.