How To Redirect From One Domain To Another! How to migrate a WordPress site or blog to a new domain without causing damage? In this article I try to explain how to migrate a website without having to start from scratch and without making too many SEO mistakes, thus losing the rankings obtained.
When it comes to WordPress migration , or the migration of a blog or a website, you have to be careful about the operations to be carried out, to avoid taking risks on the SEO side.
It is in fact possible to make “SEO Friendly” migrations , which will help us not to lose the work done over time, but we need to know what to do to preserve the visibility and organic positioning of the blog or site they want to transfer.
If the redirect and transfer preparation operations are not performed correctly , in fact, the risk is to lose organic visibility , so let’s try to understand what are the steps to take for a correct redirect .
How to migrate a domain / site to a new domain?
A site should be prepared for its redirect or change of domain , structure or template. To do this we must therefore verify that:
- Internal links
They are up to date and functioning. A good practice is to also check for any rel = ”Canonical” and errors that the Google Search Console could report to us (even tools such as SEMRush and SEOZoom can notify us if there are serious errors on the site).
Once this is done, it would be good to crawl the site and save data, URL structure and what is needed in an Excel file.
Furthermore, before migrating the domain, it is good practice to correct all 3xx, 4xx and 5xx errors thus making the internal navigation correct. We also download the list of backlinks pointing to our old site ( Ahrefs , Majestic or SEMRush can help us get a picture of the current situation of our site), then we can update the sitemap and send it to Google.
Once we have found all this data, we can easily make 301 redirects on the new domain: these redirects should be written in such a way as to redirect every old URL to the new URL (what is called one to one redirect in jargon), that’s why the procedure more correct is to download an Excel (you will see at the end of the article as I originally did, in a fairly “artisan” way).
Remember to enter the new site on the Google Search Console to immediately start recording data, information and reports from Google.
How to migrate a site from an old domain to a new one?
The lines above were a bit more technical, but for those who don’t want to create excel files, use SEO tools and yet find themselves forced to transfer a domain?
Here is a simple list of steps you can take to migrate your domain:
- Make a backup of your website: Download all the contents of your hosting space on your computer;
- Make a backup of the MySQL Database: You can do it by accessing the Cpanel and then the PHPMyAdmin to download, or export the database in sql or zip format;
- Configure the new hosting : buy the new domain, create a database then log in to phpmyadmin and load your old database;
- Upload the site to the FTP space: Access the FTP and upload the contents of the site you downloaded to your computer
4 Different Types of Redirects
Speaking of redirects, it is good to know that there are four different types of redirects:
- The Meta Refresh URL Redirect: not well seen by search engines, it allows you to make a redirect, and then bring the user to a new site, by refreshing the page after a certain number of seconds. The code to insert is <meta http-equiv = “refresh” content = “6; url = http: //www.where you want to send the new visitor” />
- The Redirect with Frame is useful when it points to a subfolder that already exists or to assign a domain to a free space on a provider that makes its directory available, not recommended when you have to map a domain;
- The HTML URL Redirect instead allows you to view the old domain with the new content
One of the problems that many bloggers face, and which I have also encountered, is the problem of “redirect”.
What does redirect mean? How does the redirect work? As always, I will try to be simple, short and comprehensive.
I also did not know what it was exactly, but as soon as you start to choose your own domain and, consequently, want to transfer the old blog…. here comes the redirect problem!
Monetizing was first hosted by netsons for free, until last weekend when I bought the domain www.monetizing.com
After a thousand and one vicissitudes, I finally managed to import articles, modify the template, fix everything there was to fix but on the most beautiful here is the important problem: The redirect, that is, how do I bring all the visitors of the old monetizing here?
After various researches, here are the steps I took:
- I opened FileZilla (You can then use the program you use to upload the files to your FTP);
- I downloaded the Index.php file present in the main root;
- I renamed the file in the root (after having downloaded the Index.php file a second time and renamed it “Index2.php” to have a backup copy);
- I opened the downloaded file on the PC;
- I deleted its contents and inserted these lines of code: