Changing your website’s domain name can seem like a complex process, but with MilesWeb’s cPanel hosting, it becomes much more manageable. Whether you are rebranding or acquiring a better domain, migrating your site correctly ensures that you maintain functionality and SEO value. This guide will walk you through moving a website to another domain name on MilesWeb’s cPanel with a step-by-step approach.
Prerequisites
- Before proceeding with the domain migration, ensure you have the following:
- MilesWeb cPanel access for both the old and new domains.
- A backup of your website files and databases.
- Updated DNS records for the new domain.
- FTP or File Manager access to transfer files.
- Basic knowledge of cPanel operations.
Step 1: Backup Your Website Files and Database
Backup Files:
- Log into your MilesWeb cPanel.
- Navigate to File Manager and open the public_html directory.
- Select all files and click Compress to create a ZIP archive.
- Download the ZIP file to your local system.
Backup Database:
- In cPanel, go to phpMyAdmin.
- Select your database from the left panel.
- Click on the Export tab and choose Quick as the export method.
- Click Go to download the SQL file.
Step 2: Add a New Domain in MilesWeb CPanel
- In MilesWeb cPanel, head over to Addon Domains.
- Type in the new domain and set the document root to public_html/newdomain.
- You are finished when you click on Add Domain.
Step 3: Transfer Files to the New Domain
Launch File Manager from cPanel.
- Go to the new domain directory, which is located in public_html/newdomain.
- Transfer the ZIP file that contains files for your website.
- Uncompress the ZIP file.
Step 4: Make a new database and import an existing one.
Select MySQL Databases in cPanel.
- Make a new database and remember its name.
- Create a new user for this database with full permissions.
- In the newly created database, go to phpMyAdmin and then click on Import.
- Select the SQL file that you previously downloaded and click Go for the importing process.
Step 5. Updating Configuration Settings
For WordPress Websites:
- Access your File Manager and reset your wp-config.php file.
- Find these lines and make the required changes:
define( 'WP_HOME', 'https://newdomain.com') ;
define( 'WP_SITEURL', 'https://newdomain.com') ;
Please ensure that the changes are kept and then proceed further.
For Other CMS or Custom Websites:
Change any configuration files that have the old domain in them.
If needed, modify database URLs using phpMyAdmin alongside an SQL query such as:
UPDATE wp_options SET option_value = replace(option_value, 'https://olddomain.com','https://newdomain.com') WHERE option_name = 'siteurl' OR option_name = 'home';
Step 6. Changing DNS Records
- Navigate to your domain registrar and change your A record to redirect to MilesWeb’s hosting server.
- Make changes to domain settings if using a CDN or Cloudflare.
- Please wait until the next 24 hours for full-service propagation.
Step 7: Develop 301 Redirects for SEO
- In order to preserve SEO rankings, create 301 redirects from the old website link to the new one:
- Change your .htaccess file located in public_html for the old domain.
- In the file, add the following lines:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^olddomain.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.olddomain.com [NC]
RewriteRule ^(.*)$ https://newdomain.com/$1 [L, R3 01, NC, NC]
Ensure the file has been saved and uploaded.
Step 8: Modify Requirements on Google Search Console and Analytics
- Access your Google Search Console account and input the newly acquired domain.
- Utilize the Change of Address Tool to notify Google regarding the relocation.
- Modify your domain name in Google Analytics.
- Search for broken links and resolve any existing problems.
Step 9: Validate the Functionality of the Website
- Launch a browser and navigate to your new domain. Confirm that all pages are loading.
- Carry out testing on forms, images, and other functionalities.
- Perform an SEO audit to check for redirects, indexing, and other aspects.
Using MilesWeb cPanel to migrate a website to a new domain follows a logical sequence designed to maintain uptime and protect your SEO. By carefully executing the steps above, you can migrate your website with no loss of traffic and data integrity.