There are many reasons to move a website to a new domain. One of them is moving a site from a subdomain to a real domain, or moving a site from a free hosting subdomain to a paid host and domain. Some marketers say that with a 301 redirect you can get rid of a Google sandbox.
One of my websites was recently penalized and I wanted to try out the latter theory. I moved the penalized site to a new domain and I used the 301 permanent redirect. This is how I did it:
- Go to the cPANEL of your hosting account > click on file manager > click on the folder of the site and compress the file. This will create a .zip file of your site’s files. If done corretly it should look like this mysite.zip. This won’t delete the folder of your website.
- Go to the FTP manager and download the compressed file. In FTPZilla you can simply drag it on your desktop.
- Go to Cpanel > phpMyAdmin > Select the database of the site > Download/EXPORT it (make sure you select UFT8 as Character set of the file). Put it on your desktop.
- Log in to the admin section of your ‘old’ wordpress site > Tools > Export > Select ‘All Content’ and Download Export File (in case you mess up this file will come in handy). This file will contain all posts and pages of your website, but no images.
- Go to the cpanel of the site where the new domain is hosted and create a new database in “MySQL Databases”. Lets call the database database_A. Now add a new user to database_A and lets call it user_A. Remember the password of user_A.
- To to phpMyAdmin and import the database you exported in step3. It should be on your desktop. You can only import it if the database is empty.
- Unzip the file from step 2 and upload it to your new domain via FTP or FileManager.
- Open the file called wp-config.php and enter the database_A and user_A+password to this file. You will enter the database name like this: define(‘DB_NAME’, ‘database_A’)
- Your new site should work now.
- This is the last step: 301 permanently redirect your old site, this way google and other search engines will know that you have moved your site and will (hopefully) pass pagerank and backlinks. Within 2-3 weeks you should see the new site ranking for the old keywords on the same position.
Top 301 redirect a site open the .htaccess file of the old site and add this line
Redirect 301 / http://www.newsite.com
Please leave a comment if this has helped you.
Resources: free image by Eros Erika @dreamstime