How to redirect an old domain to a new host which has a different page structure

 I had a site with the web host provider webnode for 'easy2boot.com'. This was not a WordPress site however and the webnode Content Management System (CMS) that I was using was no longer maintained by webnode. The only way to transfer my site to their new CMS and get better support and the new features that I needed (ads.txt) was to make a completely new site on webnode. Since I was paying for the Premium package (due to the high bandwidth it required, as I get thousands of hits a day), I decided I might as well set up a new site with a different host and try WordPress instead. 

So I went with Hostinger and I don't regret it one bit! Hostinger are always very helpful in sorting out any problems and very good value too.

I wanted to make a new site with a new domain at 'easy2boot.xyz' but since all the pages would have different URLs, I planned to have both sites up and running at the same time. I would later redirect all .com traffic to the new easy2boot.xyz site.

When an http GET request is made to a host server, it needs to recognise the domain name in the URL (e.g. easy2boot.com) so I could not just direct traffic to the .xyz site because the Hostinger server would not be able to find a site on its server with that name. That meant I had to create an extra small 'dummy' site on the Hostinger server also called easy2boot.com.

So I had to have two sites on the Hostinger server plus the old webnode site:

  • 1 - webnode: Name=easyboot.com - the old site with all the old pages.
  • 2 - Hostinger: Name=easy2boot.xyz - the new site with all the new pages, etc.
  • 3 - Hostinger: Name=easy2boot.com - a minimal site with no pages - just a basic WordPress install.

The two DNS registration servers were then set up like this:

  • A - Hostinger Domain  NS: "easy2boot.xyz"  points to -> Hostinger server
  • B - webnode  Domain  NS: "easy2boot.com" points to -> WebNode server

Once satisfied that the new .xyz site (2) was working correctly and I had duplicated all the page content from the old .com site, I now needed to redirect all traffic from easy2boot.com to easy2boot.xyz as follows:

1. Ensure the dummy WordPress 'site 3' had SSL enabled so it would accept both http and https requests.

2. Install the 'All 404 Redirect to Homepage' plugin on site 2 - redirect to easyboot.xyz

3. Install the 'Redirection' plugin on site 2

4. Ask webnode for the DNS Nameserver for webnode:easy2boot.com (B) to be changed and now point to the Hostinger host server.

Now any URLs for, say, 'easy2boot.com/contact_me'  will just go to the home page on easy2boot.xyz and the URL shown in the browser will be the home page at 'easy2boot.xyz/'.

5. However, I don't want old page URLs such as easy2boot.com/contact_me to go to the home page of easy2boot.xyz. I want it to go to the new Contact page on easy2boot.xyz.

Now, all missed pages which get a 404 redirect will however be logged by the 'redirection' plugin.

So using the Redirection plugin, I went to the '404s' page (WordPress - Tools - Redirection - 404s) on the new dummy Wordpress site 2. Here (after a while) will be listed any 'bad' user-requested easy2boot.com page or file URLs which got redirected to the xyz home page because the specific page requested doesn't exist. The contact_me page could now be called 'easy2boot.xyz/contact' for instance.

I can then simply click on the redirect link under each entry in the '404s' form to open up a page redirect form where I can type in the new full target .xyz page address.

After a few days, the most frequently used pages will appear in the 404s report and I can redirect them all to the correct pages (or files) on the new .xyz site.


After a week or so, there should be very few 'missed' 404s in the report.

Eventually, in 2023, the domain registration for easy2boot.com will expire and easy2boot.com will no longer exist - unless I decide to renew the domain name registration to keep it alive...

No comments:

Post a Comment