How to Change Your Domain Name: A Step-by-Step Guide
Do you want a flawless and easy way to change your domain name without losing data and traffic?
Switching domain names can be risky if not done right and it can impact your SEO rankings and traffic.
In this guide, we’ll show you the proper way to move your website to a new domain name. We’ll even give you a post-migration checklist to make sure every bolt and nut is in the right place.
The entire process takes just 5 steps listed below:
- Take a Backup of Your Site
- Create a New Database
- Upload Backup to New Domain
- Redirect Traffic of Old Domain
- Update Google Analytics and Search Console
Before we get to the tutorial, you need to be 100% sure you want to change your domain name. So first, let’s take a look at the reasons for moving to a new domain name and the risks involved.
Reasons Why You Should Change Your Domain Name
There are times when it’s a good idea to move to a new domain name. Some of these positive reasons include:
- When you’re rebranding your business and have to change your domain name to match.
- You get a domain name that’s shorter, highly marketable, and will draw high traffic volumes.
- You’re unable to retain the existing domain because of high renewal costs.
- Your current domain is facing too many issues like being blacklisted or penalized by search engines, web hosts, and email providers.
- Your current domain name has lost its trust value after a hack or data leak.
Like this, there may be plenty of reasons that you want to switch domains. We don’t suggest making the move every time you find a better domain name.
Also, if you’ve been hit with a penalty by search engines like Google, it would be better to fix your content and resolve the penality.
While changing your domain name does have its benefits, there are some serious risks involved.
Risks of Changing Your Domain Name
When you switch domain names, there’s a high chance that your search engine rankings will be affected. But this is only a temporary effect as the search engines adjust to the changes you’ve made.
As rankings are affected, it’s a no-brainer that your traffic will also drop. Visitors who are familiar with your brand may also type in your old domain name.
You also stand to lose traffic from any backlinks on third-party sites.
But not to worry, we’ll show you how to minimize the impact on your SEO by setting up 301 redirects and updating search engines on the changes you’ve made.
Before you make the move, we strongly recommend that you research the history of the new domain.
You’ll need to check:
- Blacklists: The name might still be on blocklists of search engines, email providers, and web hosts.
- Spam Flags: Generic email addresses associated with the domain name might be flagged as spam such as [email protected] or [email protected]
- SEO red flags: Pages you create (like about, contact us, services) may already be flagged as manipulative, low quality, or spam on search engines like Google.
- Previous brand awareness: People may already associate the name to the previous brand/business and may think you’re an imposter.
Added to that, third-party websites might still be linking to this domain for its old activities. This means you’ll attract the wrong crowd to your site.
Learn how to research domains in our detailed guide: How to Check a Domain’s History
Once you’re sure the new domain is a good choice, you can go ahead with our step-by-step tutorial below.
Changing Your Domain Name
In this guide, we are assuming that you have already bought a new domain name. If you haven’t, you can use our Nameboy domain name generator to come up with a great name for your website. Once you’ve selected a domain name, you can click on its link to buy it on Bluehost or Domain.com.
When you move your domain, the process takes a few hours and usually requires no downtime. But you can take your website offline so that visitors don’t see errors while trying to access your site.
To do this, we recommend using SeedProd. It’s a free WordPress plugin that lets you enable maintenance mode in one click. For more details, see this guide from WPBeginner: How to Put Your WordPress Site in Maintenance Mode.
Now, you’re ready to move your site to a new domain. Let’s get started!
Step 1: Create a Backup of Your Site
To get started with the migration process, you’ll need to take a full backup of your website.
This will act as a duplicate that you can move to your new domain. Plus, if things go wrong at any point in the process, you’ll have your backup copy as a safety net.
There are plenty of WordPress backup plugins you can use.
Today, we’ll use the Duplicator plugin. It has a free version so you can backup and migrate your site without spending a dime.
To take a backup, first, install and activate the Duplicator plugin on your existing website.
Then select the plugin from your WordPress menu and inside the dashboard, click on the ‘Create New’ button.
Duplicator will display options that allow you to make changes to the backup settings. You can leave the default configurations and click on the ‘Next’ button.
Now the plugin’s wizard will run a scan to make sure there are no issues on your website. If it finds any issues, it will display a warning with instructions to fix them.
If everything is good to go, the items listed with be marked ‘Good’. All that’s left to do is click on the ‘Build’ button.
The Duplicator plugin will now create a backup of your website. Depending on the size of your website, this could take a few minutes.
When it’s ready, you’ll see 2 files available.
The Archive file is your backup and contains a complete copy of your WordPress files. It includes your WordPress themes, permalinks settings, plugins, uploads, and any other files created by WordPress plugins.
The Installer script is a PHP file that will help you unpack the backup on your new domain.
You can use the One-Click Download option to download both files together. Store them in a separate folder on your computer to make it easier when you upload them to the new domain.
Step 2: Create a New Database
Now you’ll need to create storage space on your new domain where you can unpack your old website’s data.
You’ll need to visit your web hosting account and open cPanel.
Now navigate to Databases section and click on mySQL Databases.
Here, add a name for your database and create one by clicking on the ‘Create Database’ button.
Then scroll down on this page and create a MySQL user. You’ll need to add a username and password and create a user profile.
Make a note of your database name and user credentials as you’ll need them later.
Now your new database user is ready but you need to give the profile permission to work on the database.
On the same page, scroll down to the ‘Add User to Database’ section. Here, you can select the database name and user you just created.
Click on the ‘Add’ button and the user profile will now have permission to edit the database.
With that, you’re ready to move your WordPress site.
Step 3: Upload the Backup to New Domain
To move domains, you’ll upload your backup to your new domain.
Duplicator has a Pro version that allows you to import your backup on your new domain. This means you won’t have to manually upload your backup using cPanel or FTP and then run the installer file.
Instead, you simply need to install and activate the Duplicator Pro plugin on your new website and upload the package under the Import tab. The plugin will handle the rest for you.
If you want to continue migrating for free, we’ll show you how to upload your backup file using cPanel.
Keep in mind that the Duplicator package includes your WordPress installation. This means you don’t have to install WordPress on your new domain if you’re following this method.
First, inside your hosting account, go to cPanel » File Manager tab.
Here, you’ll need to select your website’s root folder. Usually, this folder is named public_html or if you’ve named it something else, make sure you choose that.
Now you can use the Upload option to select your backup files which will include your installer and archive zip file.
When both files have finished uploading, visit this URL: http://example.com/installer.php
Make sure you replace “example” with your new domain name. This will launch the Duplicator migration wizard.
The wizard will automatically look for the archive file. Simply check the terms and conditions box and click on the Next button.
The wizard will ask you to configure your database information.
The regular settings include:
- Host: localhost
- Database: The name you added for your new database earlier
- Users: The new database user you created
- Password: The password you added for the new user
You can test the database to make sure it’s working. In case your hostname is wrong, you’ll need to check with your web hosting support for the exact name.
Then, click on the Next button and Duplicator will unpack your WordPress database backup on your new domain.
Next, you’ll need to update your site’s URL or Path. Duplicator will automatically detect the new domain URL and its path.
In case it doesn’t, you can manually enter your new URL. When you click on ‘Next’, Duplicator will complete the migration process.
When it’s done, you’ll see an Admin Login button which you can use to log in to your new WordPress site.
Now you’ve moved your website to your new domain but there are 2 more important steps you need to carry out to make sure the migration works properly.
Step 4: Set up Site Redirects
Your new website is ready but your visitors may still head over to your old domain. We’ll show you how to set up a redirect so visitors and search engines will automatically be directed to the new domain.
Keep in mind, your old WordPress installation should still be active in order for the redirect to work.
You can add a redirect to your old domain by editing the .htaccess file and adding a snippet of code.
But there’s an easier way and comes without the risk of breaking your site. We’ll show you how to use both methods.
1. Add Site Redirects with All in One SEO
The easiest way to redirect your old traffic is by using the All in One SEO plugin. It’s the best SEO plugin to easily optimize your site in a few clicks.
Plus, it comes with a Redirect Manager but this is available in the Pro plan.
First, you have to install and activate All in One SEO on your site.
Once activated on your site, visit the All in One SEO » Redirects page on your site.
Click on the Activate Redirects button.
Next, you need to switch to the Full Site Redirect tab and turn on the Relocate Site toggle.
After that, you need to enter your new domain name next to Relocate to domain option.
Now all that’s left to do is save your changes to store these settings, and you’re done!
2. Add Site Redirects Manually
If you want to do it manually, you can find the .htaccess file inside cPanel » File Manager » public_html folder.
In case you can’t find the file, you may need to show hidden files. You can find this option in the Settings page inside the File Manager.
Simply right-click on the .htaccess file and edit it. Then paste the following lines at the very top of the file:
RewriteRule ^(.*)$ http://www.newsite.com/$1 [R=301,L]
Note: Replace ‘newsite.com’ with your new domain in the above code.
Now you can visit your old domain and it should redirect you to the new website. There are chances that this manual method won’t work if it is not set up properly or if your server doesn’t support redirect rules.
Step 5: Update Google Analytics and Search Console
The last step in this process is to notify search engines that you’ve moved. When you do that, Google will know that they should crawl your new domain and start showing it in search results.
First, you need to make sure both the old and new domain are added in Google Search Console as two separate properties.
Next, you need to select the old domain name as the active property in your Google Search Console account dashboard.
Now click on the Settings menu from the left column and then click on the ‘Change of Address’ tool.
After this, you need to select your new domain under the Update Google section. Lastly, click on the ‘Validate & Update’ button.
Google will now validate that your old domain is redirecting to the new domain and save your changes.
On the next screen, Google Search Console will show you a step by step wizard to submit your change of address request.
That’s it! You’ve successfully moved your website to a new domain name.
Post-Migration Checklist for Domain Name Change
After you migrate your domain, you’ll want to make sure everything is functioning the way it’s supposed to. Here’s a checklist to help you cover all your bases.
- Disable Maintenance Mode: If you enabled maintenance mode using SeedProd, you can disable that now so that your website is live.
- Update links: For the redirect to work, you’ll need to keep your old installation active but at some point, you’ll want to delete your old site. It would be wise to use this time to update internal and external links to bear your new domain name.
- Test new website for errors: We suggest checking all important pages and posts to make sure everything is working fine. You should also visit your old website and check if all pages are redirecting properly.
- Submit a new XML sitemap: To get Google to crawl your new domain faster, you can submit a new XML sitemap to Google. You can easily do this using the All in One SEO plugin.
- Monitor redirects: We recommend keeping the redirects active for at least 6 months to 2 years depending on how popular your old domain was. Once your old site stops receiving traffic, you can disable the redirects and delete your old installation. To track your traffic, we recommend using MonsterInsights. It’ll give you all the stats you need right inside your WordPress dashboard.
To update your audience on the domain change, you can write a blog or update your social media accounts. If you have subscribers, you can also send an announcement to them through email newsletters or push notifications.
That’s all we have for you today. We hope you found this tutorial helpful. Next, we’ve selected these guides to help you grow your new domain:
- 10 Best Email Marketing Software to Grow Your Business (2022)
- 8 WordPress Plugins to Step up Your SEO Game
- 10+ Best Drag and Drop WordPress Page Builders (Comparison)
These posts reveal the best tools in the market to improve your web design, SEO, and email marketing so that you can grow your website fast.
Comments Leave a Reply